Browse Source

doc: submenu popupOffset, close #5312

pull/4696/head
tangjinzhou 3 years ago
parent
commit
ce00829d85
  1. 15
      components/menu/index.en-US.md
  2. 17
      components/menu/index.zh-CN.md
  3. 2
      components/menu/src/SubMenu.tsx

15
components/menu/index.en-US.md

@ -71,13 +71,14 @@ More layouts with navigation: [Layout](/components/layout).
### Menu.SubMenu
| Param | Description | Type | Default value | Version |
| -------------- | ----------------------------------- | ------------ | ------------- | ------- |
| disabled | whether sub menu is disabled or not | boolean | false | |
| expandIcon | Customized expandIcon | slot | arrow icon | | |
| key | Unique ID of the sub menu, required | string | | |
| popupClassName | Sub-menu class name | string | | 1.5.0 |
| title | title of the sub menu | string\|slot | | |
| Param | Description | Type | Default value | Version |
| --- | --- | --- | --- | --- |
| disabled | whether sub menu is disabled or not | boolean | false | |
| expandIcon | Customized expandIcon | slot | arrow icon | | |
| key | Unique ID of the sub menu, required | string | | |
| popupClassName | Sub-menu class name | string | | 1.5.0 |
| popupOffset | Sub-menu offset, not working when `mode="inline"` | \[number, number] | - | |
| title | title of the sub menu | string\|slot | | |
The children of Menu.SubMenu must be `MenuItem` or `SubMenu`.

17
components/menu/index.zh-CN.md

@ -72,14 +72,15 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3XZcjGpvK/Menu.svg
### Menu.SubMenu
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| -------------- | ------------------------ | ------------ | -------- | ----- |
| disabled | 是否禁用 | boolean | false | |
| expandIcon | 自定义 Menu 展开收起图标 | slot | 箭头图标 | |
| icon | 菜单图标 | slot | | 2.8.0 |
| key | 唯一标志, 必填 | string | | |
| popupClassName | 子菜单样式 | string | | 1.5.0 |
| title | 子菜单项值 | string\|slot | | |
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| -------------- | ------------------------------------ | ----------------- | -------- | ----- |
| disabled | 是否禁用 | boolean | false | |
| expandIcon | 自定义 Menu 展开收起图标 | slot | 箭头图标 | |
| icon | 菜单图标 | slot | | 2.8.0 |
| key | 唯一标志, 必填 | string | | |
| popupClassName | 子菜单样式 | string | | 1.5.0 |
| popupOffset | 子菜单偏移量,`mode="inline"` 时无效 | \[number, number] | - | |
| title | 子菜单项值 | string\|slot | | |
Menu.SubMenu 的子元素必须是 `MenuItem` 或者 `SubMenu`.

2
components/menu/src/SubMenu.tsx

@ -28,7 +28,7 @@ const subMenuProps = {
disabled: Boolean,
level: Number,
popupClassName: String,
popupOffset: Array as PropType<number[]>,
popupOffset: Array as unknown as PropType<[number, number]>,
internalPopupClose: Boolean,
eventKey: String,
expandIcon: Function as PropType<(p?: { isOpen: boolean; [key: string]: any }) => any>,

Loading…
Cancel
Save