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分次从后端获取节点数据 */ export declare const AsyncTree: (props: AsyncTreeProps) => JSX.Element; /** 本地数据 Tree */ export declare const Tree: ({ listData: outListData, ...statusProps }: TreeProps) => JSX.Element; export {}; //# sourceMappingURL=viewfunction.d.ts.map