doc: submenu required key

This commit is contained in:
tangjinzhou 2021-12-09 22:57:44 +08:00
parent 95a1b4a964
commit fcd6add766
2 changed files with 6 additions and 2 deletions

View File

@ -68,12 +68,14 @@ More layouts with navigation: [Layout](/components/layout).
| -------------- | ----------------------------------- | ------------ | ------------- | ------- |
| popupClassName | Sub-menu class name | string | | 1.5.0 |
| disabled | whether sub menu is disabled or not | boolean | false | |
| key | Unique ID of the sub menu | string | | |
| key | Unique ID of the sub menu, required | string | | |
| title | title of the sub menu | string\|slot | | |
| expandIcon | Customized expandIcon | slot | arrow icon | |
The children of Menu.SubMenu must be `MenuItem` or `SubMenu`.
`SubMenu` must pass the key. If it is not passed, the sub-elements under the SubMenu will be rendered in advance, and some scenes cannot be effectively highlighted.
### Menu.SubMenu Events
| Events Name | Description | Arguments |

View File

@ -69,13 +69,15 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3XZcjGpvK/Menu.svg
| -------------- | ------------------------ | ------------ | -------- | ----- |
| popupClassName | 子菜单样式 | string | | 1.5.0 |
| disabled | 是否禁用 | boolean | false | |
| key | 唯一标志 | string | | |
| key | 唯一标志, 必填 | string | | |
| title | 子菜单项值 | string\|slot | | |
| expandIcon | 自定义 Menu 展开收起图标 | slot | 箭头图标 | |
| icon | 菜单图标 | slot | | 2.8.0 |
Menu.SubMenu 的子元素必须是 `MenuItem` 或者 `SubMenu`.
`SubMenu` 必须传递 key如不传递该 SubMenu 下子元素将提前渲染,而且部分场景无法进行有效高亮。
### SubMenu 事件
| 事件名称 | 说明 | 回调参数 |