import * as React from "react"; import { ConfigConsumerProps } from "../Config"; interface ITreeProps { /** * 自定义导航标志 * * @default Collapse **/ renderCollapse?: React.ReactNode; /** * 自定义叶子节点 * * @default LeafNode **/ renderLeaf?: React.ReactNode; /** * 是否支持多选 * * @default false **/ multiple?: boolean; /** * 是否自动折叠根节点 * * @default true **/ autoExpandParent?: boolean; /** * 是否默认全部展开 * * @default false **/ defaultExpandAll?: boolean; /** * 默认选中的节点 * * @default [] **/ defaultCheckedKeys?: string[]; /** * 导航折叠触发 function(node,collapsed,e) * * @default ()=>{} **/ onExpand?: (...args: any[]) => {}; /** * 选中节点触发 function(node,active,e) * * @default ()=>{} **/ onSelect?: (...args: any[]) => {}; /** * 选中节点触发 function(fromnode,destnode,e) * * @default ()=>{} **/ onDrop?: (...args: any[]) => {}; /** * 是否可拖拽 * * @default false **/ draggable?: boolean; /** * 是否有checkbox框 * * @default false **/ hasCheck?: boolean; /** * 点checkbox框时触发 function(node,check,e) * * @default ()=>{} **/ onCheck?: (...args: any[]) => {}; /** * 树形节点数据源 * * **/ sourceData?: any; /** * 自定义前缀 * @default ‘lg’ **/ prefixCls?: string; /** * 是否有搜索 * @default false **/ hasSelect?: boolean; /** * 过滤条件 * * @default **/ filterOption?: (val: any, option: any) => boolean; } declare class Tree extends React.Component { private prefixCls; constructor(props: any); handleChange: (e: any) => void; renderList: () => any; renderTree: ({ getPrefixCls }: ConfigConsumerProps) => JSX.Element | null; render(): JSX.Element; } export default Tree;