eo-tree
<eo-tree>
树形构件
Examples
Basic
Checkable
titleSuffixBrick
Properties
Name | Description | Type | Default | Required |
---|---|---|---|---|
dataSource | TreeNode[] | |||
checkable | boolean | |||
selectable | boolean | true | ||
defaultExpandAll | boolean | |||
showLine | boolean | |||
expandedKeys | TreeNodeKey[] | |||
checkedKeys | TreeNodeKey[] | |||
nodeDraggable | boolean | { icon?: false } | |||
switcherIcon | "auto" | "chevron" | false | |||
allowDrop | ((info: AllowDropInfo) => boolean) | |||
titleSuffixBrick | { useBrick: UseBrickConf } |
Events
Name | Description | Event Detail |
---|---|---|
check | TreeNodeKey[] | |
check.detail | CheckDetail | |
expand | TreeNodeKey[] | |
node.drop | DropDetail |
Type references
TreeNode
extends BasicDataNode
Name | Type | Required | Description |
---|---|---|---|
title | string | ✅ | |
key | TreeNodeKey | ✅ | |
children | TreeNode[] |
AllowDropInfo
Name | Type | Required | Description |
---|---|---|---|
dragNode | TreeNode | ✅ | |
dropNode | TreeNode | ✅ | |
dropPosition | number | ✅ | The drop position is relative to the drop node, inside 0, top -1, bottom 1 |
CheckDetail
Name | Type | Required | Description |
---|---|---|---|
checkedKeys | TreeNodeKey[] | ✅ | |
halfCheckedKeys | TreeNodeKey[] | ✅ |
DropDetail
Name | Type | Required | Description |
---|---|---|---|
dragNode | TreeNode | ✅ | |
dropNode | TreeNode | ✅ | |
dropPosition | number | ✅ | The drop position is relative to the drop node, inside 0, top -1, bottom 1 |
TreeNodeKey
string | number