eo-directory-tree
<eo-directory-tree>
目录树
Examples
Basic
Properties
Name | Description | Type | Default | Required |
---|---|---|---|---|
data | 数据源 | TreeItem[] | [] | |
directoryTitle | 目录标题 | string | ||
searchable | 可搜索 | boolean | ||
placeholder | 搜索占位说明 | string | ||
searchFields | 除了 title 以外,额外的搜索字段 | (string | string[])[] | ||
suffixBrick | 后缀 useBrick | { useBrick: UseBrickConf } | ||
selectedKeys | 选中的 keys | string[] | ||
expandedKeys | 展开的 keys | string[] |
Events
Name | Description | Event Detail |
---|---|---|
expand | 展开事件 | { keys: string[]; node: NodeData } - keys - 展开的 keys |
select | 选择事件 | { keys: string[]; node: NodeData } - keys - 选择的 keys |
Methods
Name | Description | Params | Returns |
---|---|---|---|
expandAll | 展开全部 | ||
collapseAll | 收起全部 | ||
expandAccordingToSelectedKeys | 根据选择项展开 |
Type references
TreeItem
Name | Type | Required | Description |
---|---|---|---|
key | string | ✅ | |
title | string | ✅ | |
children | TreeItem[] | ||
[key: string] | any |
NodeData
Name | Type | Required | Description |
---|---|---|---|
depth | number | ✅ | |
index | number | ✅ | |
data | TreeItem | ✅ |