跳到主要内容

apis-directory-tree

<api-market.apis-directory-tree>

API目录树

Examples​

Basic​

Playground

Properties​

NameDescriptionTypeDefaultRequired
data

数据源

TreeItem[] []
directoryTitle

目录标题

string
searchable

可搜索

boolean
hiddenNodeSuffix

隐藏node节点右侧操作

boolean false
placeholder

搜索占位说明

string
searchFields

除了 title 以外,额外的搜索字段

(string | string[])[]
selectedKeys

选中的 keys

string[]
expandedKeys

展开的 keys

string[]

Events​

NameDescriptionEvent Detail
expand

展开事件

{ keys: string[]; node: NodeData } - keys - 展开的 keys
select

选择事件

{ keys: string[]; node: NodeData } - keys - 选择的 keys
action.click

actions点击事件

{ data: NodeData; action: SimpleActionType }

Methods​

NameDescriptionParamsReturns
expandAll

展开全部

collapseAll

收起全部

expandAccordingToSelectedKeys

根据选择项展开

Type references​

TreeItem​

NameDescriptionTypeDefaultRequired
keystring✅
titlestring✅
childrenTreeItem[]
[key: string]any

NodeData​

NameDescriptionTypeDefaultRequired
depthnumber✅
indexnumber✅
dataTreeItem✅