apis-directory-tree
<api-market.apis-directory-tree>
API目录树
Examples
Basic
Properties
Name | Description | Type | Default | Required |
---|---|---|---|---|
data | 数据源 | TreeItem[] | [] | |
directoryTitle | 目录标题 | string | ||
searchable | 可搜索 | boolean | ||
hiddenNodeSuffix | 隐藏node节点右侧操作 | boolean | false | |
placeholder | 搜索占位说明 | string | ||
searchFields | 除了 title 以外,额外的搜索字段 | (string | string[])[] | ||
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 |
action.click | actions点击事件 | { data: NodeData; action: SimpleActionType } |
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 | ✅ |