import React from 'react'; import 'antd/es/tree/style/index'; import 'antd/es/dropdown/style/index'; import './index.less'; interface ITreeProps { /** * @description 主要ID */ primaryId?: string; /** * @description 主要title */ primaryTitle?: string; /** * @description 类属性 */ className?: React.HTMLAttributes | string | undefined; /** * @description 样式 */ style?: React.CSSProperties | undefined; /** * @description 标题 */ title?: React.ReactNode | string; /** * @description 空提示信息 */ emptyDescription?: React.ReactNode; extra?: React.ReactNode; createIcon?: React.ReactNode; editIcon?: React.ReactNode; deleteIcon?: React.ReactNode; /** * @description 是否为加载中状态 */ loading?: boolean; /** * @description 数据 */ data: Array; /** * @description 张开/关闭图标 */ icon?: { open?: JSX.Element; close?: JSX.Element; }; /** * @description 设置节点可拖拽 * @default false */ draggable?: boolean; /** * @description 设置选中的树节点 */ selectedKeys?: string[]; expandAction?: any | undefined; /** * @description 根目录可创建 * @default true */ rootCreate?: boolean; /** * @description 显示其他字段 */ otherField?: string; /** * @description 显示不受限制 * @default false */ nowrap?: boolean; searchPlaceholder?: string; /** * @description 默认展开所有树节点 */ defaultExpandAll?: boolean; /** * @description 选择 */ onSelect?: (id: number, value?: any) => void; /** * @description 新增 */ onCreate?: (value?: any) => void; /** * @description 编辑 */ onEdit?: (value: any) => void; /** * @description 删除 */ onDelete?: (id: number | string, value?: any) => void; /** * @description drop 触发时调用 */ onDrop?: (value: any) => void; /** * 宽度改变 */ onResize?: (value: number) => void; } declare const Tree: React.FC; export default Tree;