The Tree component is a list of multi-level structures.
The Tree component is a list of multi-level structures.
import { Tree } from '@yuntijs/ui';| Name | Description | Type | Default |
|---|---|---|---|
| showLine | -- | boolean|{showLeafIcon?:boolean|TreeLeafIcon} | -- |
| className | -- | string | -- |
| multiple | Whether to support multiple selection | boolean | -- |
| autoExpandParent | Whether to automatically expand the parent node | boolean | -- |
| checkStrictly | Node selection in Checkable state is fully controlled (the selected state of parent and child nodes is no longer associated) | boolean | -- |
| checkable | Whether to support selection | boolean | -- |
| disabled | whether to disable the tree | boolean | -- |
| defaultExpandAll | Expand all tree nodes by default | boolean | -- |
| defaultExpandParent | Expand the corresponding tree node by default | boolean | -- |
| defaultExpandedKeys | Expand the specified tree node by default | any[] | -- |
| expandedKeys | (Controlled) Expand the specified tree node | any[] | -- |
| checkedKeys | (Controlled) Tree node with checked checkbox | Array|{checked:Key[];halfChecked:Key[]} | -- |
| defaultCheckedKeys | Tree node with checkbox checked by default | any[] | -- |
| selectedKeys | (Controlled) Set the selected tree node | any[] | -- |
| defaultSelectedKeys | Tree node selected by default | any[] | -- |
| selectable | -- | boolean | -- |
| filterAntTreeNode | Click on the tree node to trigger | (node:import("/node_modules/antd/es/tree/Tree").AntTreeNode)=>boolean | -- |
| loadedKeys | -- | any[] | -- |
| draggable | Set the node to be draggable (IE>8) | DraggableFn|boolean|DraggableConfig | -- |
| style | -- | {} | -- |
| showIcon | -- | boolean | -- |
| icon | -- | |string|number|unknown|ReactElement|unknown|ReactPortal|Promise<AwaitedReactNode>|(props:import("/node_modules/antd/es/tree/Tree").AntdTreeNodeAttribute)=>|string|number|unknown|ReactElement|unknown|ReactPortal|Promise<AwaitedReactNode>|boolean|boolean | -- |
| switcherIcon | -- | |string|number|unknown|ReactElement|unknown|ReactPortal|Promise<AwaitedReactNode>|(props:import("/node_modules/antd/es/tree/Tree").AntTreeNodeProps)=>|string|number|unknown|ReactElement|unknown|ReactPortal|Promise<AwaitedReactNode>|boolean|boolean | -- |
| switcherLoadingIcon | -- | ReactNode | -- |
| prefixCls | -- | string | -- |
| children | -- | ReactNode | -- |
| blockNode | -- | boolean | -- |
| ref | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). | any | -- |
| key | -- | Key|any | -- |