import React, { Component } from 'react'; import { TreeProps } from '@alifd/next/types/tree'; export interface TreeSourceType { /** 节点 ID */ id?: string; /** 节点内容 */ label?: React.ReactNode | string; /** 节点的子节点 */ children?: any; /** 是否禁用菜单和禁止选中 */ disabled?: boolean; /**运行其他值 */ [key: string]: any; } interface PropsType extends TreeProps { /** 单选中节点 ID */ selectedNodeId?: string | string[]; /** 全局的disabled属性*/ disabled?: boolean; menuSource?: any; /** 数据源 */ treeSource?: TreeSourceType; /** 点击菜单触发的回调 * 参数: * keys:当前菜单的文本内容 * node: 所在节点的节点信息 */ onClickMenuItem?: Function; /** 是否展示搜索框 */ showSearch?: boolean; /** 额外的节点 key */ extraExpandedKeys?: string | number | any[]; /**查询框的props */ searchProps?: Object; /** 查询为空的结果 */ searchEmpty: React.ReactNode; } interface StateType { selectedKeys: string[]; dataSource: any[]; searchValue: string; expandedKeys: any[]; matchedKeys: any[]; } interface defaultType { searchEmpty: React.ReactNode; showSearch: false; checkable: false; showLine: false; } export default class IotTree extends Component { static defaultProps: defaultType; static Node: any; constructor(props: any); componentDidMount(): void; UNSAFE_componentWillReceiveProps: (nextProps: any) => void; updateState(nextProps: any): void; getDisabledKeys(nodes: any[]): any[]; getRootId(nodes: any): any; iterNode(node: any, callback: any): void; onSelect: (key: any, e: any) => void; onSearch: (value: any) => void; deleteChildNode: (nodes: any, ids: any[]) => void; onExpand: (keys: any, e: any) => void; renderSearch(): JSX.Element | null; renderTree(): JSX.Element; renderNode(node: any, level: any, disabled: any): JSX.Element | null; render(): JSX.Element; } export {};