From 4fc0fea5cda112eeb3d1ec52039d37f65e8430e6 Mon Sep 17 00:00:00 2001 From: bqy_fe <1743369777@qq.com> Date: Sat, 9 Apr 2022 22:15:57 +0800 Subject: [PATCH] docs(menu): update type definition (#5466) * docs(menu): update type definition * docs(menu): update type definition --- components/menu/index.en-US.md | 12 ++++++------ components/menu/index.zh-CN.md | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/components/menu/index.en-US.md b/components/menu/index.en-US.md index fb5055402..daecb2add 100644 --- a/components/menu/index.en-US.md +++ b/components/menu/index.en-US.md @@ -49,7 +49,7 @@ More layouts with navigation: [Layout](/components/layout). | style | style of the root node | object | | | 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 | -| 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` | ### Menu Events @@ -63,11 +63,11 @@ More layouts with navigation: [Layout](/components/layout). ### Menu.Item -| Param | Description | Type | Default value | -| -------- | ------------------------------------ | ------- | ------------- | -| disabled | whether menu item is disabled or not | boolean | false | -| key | unique id of the menu item | string | | -| title | set display title for collapsed item | string | | +| Param | Description | Type | Default value | +| -------- | ------------------------------------ | -------------- | ------------- | +| disabled | whether menu item is disabled or not | boolean | false | +| key | unique id of the menu item | string | | +| title | set display title for collapsed item | string \| slot | | ### Menu.SubMenu diff --git a/components/menu/index.zh-CN.md b/components/menu/index.zh-CN.md index 33a2da3ba..d31e9d5e8 100644 --- a/components/menu/index.zh-CN.md +++ b/components/menu/index.zh-CN.md @@ -49,7 +49,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3XZcjGpvK/Menu.svg | selectedKeys(v-model) | 当前选中的菜单项 key 数组 | string\[] | | | subMenuCloseDelay | 用户鼠标离开子菜单后关闭延时,单位:秒 | number | 0.1 | | subMenuOpenDelay | 用户鼠标进入子菜单后开启延时,单位:秒 | number | 0 | -| theme | 主题颜色 | string: `light` `dark` | `light` | +| theme | 主题颜色 | `light` \| `dark` | `light` | | triggerSubMenuAction | 修改 Menu 子菜单的触发方式 | `click` \| `hover` | `hover` | ### Menu 事件 @@ -63,12 +63,12 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3XZcjGpvK/Menu.svg ### Menu.Item -| 参数 | 说明 | 类型 | 默认值 | 版本 | -| -------- | ------------------------ | ----------- | ------ | ----- | -| disabled | 是否禁用 | boolean | false | | -| icon | 菜单图标 | slot | | 2.8.0 | -| key | item 的唯一标志 | string | | | -| title | 设置收缩时展示的悬浮标题 | string/slot | | | +| 参数 | 说明 | 类型 | 默认值 | 版本 | +| -------- | ------------------------ | -------------- | ------ | ----- | +| disabled | 是否禁用 | boolean | false | | +| icon | 菜单图标 | slot | | 2.8.0 | +| key | item 的唯一标志 | string | | | +| title | 设置收缩时展示的悬浮标题 | string \| slot | | | ### Menu.SubMenu @@ -94,9 +94,9 @@ Menu.SubMenu 的子元素必须是 `MenuItem` 或者 `SubMenu`. ### Menu.ItemGroup -| 参数 | 说明 | 类型 | 默认值 | -| ----- | -------- | ------------------------ | ------ | -| title | 分组标题 | string\|\|function\|slot | | +| 参数 | 说明 | 类型 | 默认值 | +| ----- | -------- | ------------ | ------ | +| title | 分组标题 | string\|slot | | Menu.ItemGroup 的子元素必须是 `MenuItem`.