Skip to content

Commit

Permalink
doc: submenu popupOffset, close #5312
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Mar 12, 2022
1 parent fc3bd1c commit ce00829
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
15 changes: 8 additions & 7 deletions components/menu/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
17 changes: 9 additions & 8 deletions components/menu/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
2 changes: 1 addition & 1 deletion components/menu/src/SubMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down

0 comments on commit ce00829

Please sign in to comment.