docs(menu): update type definition (#5466)

* docs(menu): update type definition

* docs(menu): update type definition
pull/5477/head
bqy_fe 3 years ago committed by GitHub
parent 6e9cb0bd56
commit 4fc0fea5cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,7 +49,7 @@ More layouts with navigation: [Layout](/components/layout).
| style | style of the root node | object | | | style | style of the root node | object | |
| subMenuCloseDelay | delay time to hide submenu when mouse leave, unit: second | number | 0.1 | | subMenuCloseDelay | delay time to hide submenu when mouse leave, unit: second | number | 0.1 |
| subMenuOpenDelay | delay time to show submenu when mouse enter, unit: second | number | 0 | | subMenuOpenDelay | delay time to show submenu when mouse enter, unit: second | number | 0 |
| theme | color theme of the menu | string: `light` `dark` | `light` | | theme | color theme of the menu | `light` \| `dark` | `light` |
| triggerSubMenuAction | method of trigger submenu | `click` \| `hover` | `hover` | | triggerSubMenuAction | method of trigger submenu | `click` \| `hover` | `hover` |
### Menu Events ### Menu Events
@ -64,10 +64,10 @@ More layouts with navigation: [Layout](/components/layout).
### Menu.Item ### Menu.Item
| Param | Description | Type | Default value | | Param | Description | Type | Default value |
| -------- | ------------------------------------ | ------- | ------------- | | -------- | ------------------------------------ | -------------- | ------------- |
| disabled | whether menu item is disabled or not | boolean | false | | disabled | whether menu item is disabled or not | boolean | false |
| key | unique id of the menu item | string | | | key | unique id of the menu item | string | |
| title | set display title for collapsed item | string | | | title | set display title for collapsed item | string \| slot | |
### Menu.SubMenu ### Menu.SubMenu

@ -49,7 +49,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3XZcjGpvK/Menu.svg
| selectedKeys(v-model) | 当前选中的菜单项 key 数组 | string\[] | | | selectedKeys(v-model) | 当前选中的菜单项 key 数组 | string\[] | |
| subMenuCloseDelay | 用户鼠标离开子菜单后关闭延时,单位:秒 | number | 0.1 | | subMenuCloseDelay | 用户鼠标离开子菜单后关闭延时,单位:秒 | number | 0.1 |
| subMenuOpenDelay | 用户鼠标进入子菜单后开启延时,单位:秒 | number | 0 | | subMenuOpenDelay | 用户鼠标进入子菜单后开启延时,单位:秒 | number | 0 |
| theme | 主题颜色 | string: `light` `dark` | `light` | | theme | 主题颜色 | `light` \| `dark` | `light` |
| triggerSubMenuAction | 修改 Menu 子菜单的触发方式 | `click` \| `hover` | `hover` | | triggerSubMenuAction | 修改 Menu 子菜单的触发方式 | `click` \| `hover` | `hover` |
### Menu 事件 ### Menu 事件
@ -64,11 +64,11 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3XZcjGpvK/Menu.svg
### Menu.Item ### Menu.Item
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
| -------- | ------------------------ | ----------- | ------ | ----- | | -------- | ------------------------ | -------------- | ------ | ----- |
| disabled | 是否禁用 | boolean | false | | | disabled | 是否禁用 | boolean | false | |
| icon | 菜单图标 | slot | | 2.8.0 | | icon | 菜单图标 | slot | | 2.8.0 |
| key | item 的唯一标志 | string | | | | key | item 的唯一标志 | string | | |
| title | 设置收缩时展示的悬浮标题 | string/slot | | | | title | 设置收缩时展示的悬浮标题 | string \| slot | | |
### Menu.SubMenu ### Menu.SubMenu
@ -95,8 +95,8 @@ Menu.SubMenu 的子元素必须是 `MenuItem` 或者 `SubMenu`.
### Menu.ItemGroup ### Menu.ItemGroup
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| ----- | -------- | ------------------------ | ------ | | ----- | -------- | ------------ | ------ |
| title | 分组标题 | string\|\|function\|slot | | | title | 分组标题 | string\|slot | |
Menu.ItemGroup 的子元素必须是 `MenuItem`. Menu.ItemGroup 的子元素必须是 `MenuItem`.

Loading…
Cancel
Save