import React from 'react'; import { TreeViewProps } from '@mui/lab/TreeView'; import { TreeItemProps } from '@mui/lab/TreeItem'; export type AsyncTreeProps = TreeViewProps & Partial<{ /** 异步获取子节点方法 */ createChildren: (parent?: T) => Promise; /** key键 * @default "id" */ keyExpr: string; /** 展示键 * @default "name" */ displayExpr: string; /** 根节点Key */ rootValue: any; /** 父节点 */ parentExpr: string; /** 子节点参数 */ treeItemProps: TreeItemProps; /** 是否有子节点属性 * @default "hasChildren" */ hasChildrenExpr: string; /** * 改变Expanded */ setExpanded: any; }>; type TreeData = Array>; }>; export type TreeProps = TreeViewProps & Partial<{ /** 异步获取子节点方法 */ listData: TreeData; /** key键 * @default "id" */ keyExpr: string; /** 展示键 * @default "name" */ displayExpr: string; /** 根节点Key */ rootValue: any; /** 子节点键 用于tree型数据 */ childrenExpr: string; /** 子节点参数 */ treeItemProps: Partial; /** 父节点 用于plat型数据 */ parentExpr: string; /** 数据结构 */ dataStructure: 'tree' | 'plat'; }>; /** * 将Tree参数注入 */ export declare const TreeProps: React.Context & AsyncTreeProps>; /** * @description 异步树 * @description 通过createChildren分次从后端获取节点数据 */ /** * @description 异步树 * @description 通过createChildren分次从后端获取节点数据 * @date 2023/4/1 - 17:23:26 * @param {AsyncTreeProps} props * @returns {*} */ export declare const AsyncTree: (props: AsyncTreeProps) => JSX.Element; /** * Tree * @date 2023/4/1 - 17:24:17 * * @param {TreeProps} { listData: outListData = [], ...statusProps } * @returns {*} */ export declare const Tree: ({ listData: outListData, ...statusProps }: TreeProps) => JSX.Element; export {}; //# sourceMappingURL=view.d.ts.map