eo-directory
<eo-directory>
构件 eo-directory
Examples
Basic
Properties
Name | Description | Type | Default | Required |
---|---|---|---|---|
position | 设置定位方式:静态定位或固定定位。 | "static" | "fixed" | "fixed" | |
directoryTitle | 目录标题 | string | ||
menuItems | 菜单数据 | MenuItem[] | [] | ✅ |
hideRightBorder | 是否隐藏右边线 | boolean | false | |
suffixBrick | 后缀 useBrick | { useBrick: UseBrickConf } | ||
defaultSelectedKeys | 默认选中高亮的菜单项 | string[] |
Events
Name | Description | Event Detail |
---|---|---|
menu.item.click | 菜单点击,groupKey 表示对应分组的key,data 表示对应菜单项 | MenuItemClickEventDetail - { groupKey: string, data: MenuChildrenItem } |
suffix.icon.click | 点击icon,detail为 对应菜单项或者是分组的key | { key: string } - { key: string } |
Type references
MenuItem
Name | Type | Required | Description |
---|---|---|---|
title | string | ✅ | |
key | string | ✅ | |
type | "group" | "item" | ✅ | |
children | MenuChildrenItem[] | ||
suffixIcon | GeneralIconProps | ||
suffixIconTooltip | string | ||
suffixIconDisabled | boolean |
MenuChildrenItem
Name | Type | Required | Description |
---|---|---|---|
title | string | ✅ | |
key | string | ✅ | |
[key: string] | any |
MenuItemClickEventDetail
Name | Type | Required | Description |
---|---|---|---|
data | MenuChildrenItem | ✅ | |
groupKey | string |