Skip to content

Commit ce00829

Browse files
committed
doc: submenu popupOffset, close #5312
1 parent fc3bd1c commit ce00829

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

components/menu/index.en-US.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,14 @@ More layouts with navigation: [Layout](/components/layout).
7171

7272
### Menu.SubMenu
7373

74-
| Param | Description | Type | Default value | Version |
75-
| -------------- | ----------------------------------- | ------------ | ------------- | ------- |
76-
| disabled | whether sub menu is disabled or not | boolean | false | |
77-
| expandIcon | Customized expandIcon | slot | arrow icon ||
78-
| key | Unique ID of the sub menu, required | string | | |
79-
| popupClassName | Sub-menu class name | string | | 1.5.0 |
80-
| title | title of the sub menu | string\|slot | | |
74+
| Param | Description | Type | Default value | Version |
75+
| --- | --- | --- | --- | --- |
76+
| disabled | whether sub menu is disabled or not | boolean | false | |
77+
| expandIcon | Customized expandIcon | slot | arrow icon ||
78+
| key | Unique ID of the sub menu, required | string | | |
79+
| popupClassName | Sub-menu class name | string | | 1.5.0 |
80+
| popupOffset | Sub-menu offset, not working when `mode="inline"` | \[number, number] | - | |
81+
| title | title of the sub menu | string\|slot | | |
8182

8283
The children of Menu.SubMenu must be `MenuItem` or `SubMenu`.
8384

components/menu/index.zh-CN.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,15 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3XZcjGpvK/Menu.svg
7272

7373
### Menu.SubMenu
7474

75-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
76-
| -------------- | ------------------------ | ------------ | -------- | ----- |
77-
| disabled | 是否禁用 | boolean | false | |
78-
| expandIcon | 自定义 Menu 展开收起图标 | slot | 箭头图标 | |
79-
| icon | 菜单图标 | slot | | 2.8.0 |
80-
| key | 唯一标志, 必填 | string | | |
81-
| popupClassName | 子菜单样式 | string | | 1.5.0 |
82-
| title | 子菜单项值 | string\|slot | | |
75+
| 参数 | 说明 | 类型 | 默认值 | 版本 |
76+
| -------------- | ------------------------------------ | ----------------- | -------- | ----- |
77+
| disabled | 是否禁用 | boolean | false | |
78+
| expandIcon | 自定义 Menu 展开收起图标 | slot | 箭头图标 | |
79+
| icon | 菜单图标 | slot | | 2.8.0 |
80+
| key | 唯一标志, 必填 | string | | |
81+
| popupClassName | 子菜单样式 | string | | 1.5.0 |
82+
| popupOffset | 子菜单偏移量,`mode="inline"` 时无效 | \[number, number] | - | |
83+
| title | 子菜单项值 | string\|slot | | |
8384

8485
Menu.SubMenu 的子元素必须是 `MenuItem` 或者 `SubMenu`.
8586

components/menu/src/SubMenu.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const subMenuProps = {
2828
disabled: Boolean,
2929
level: Number,
3030
popupClassName: String,
31-
popupOffset: Array as PropType<number[]>,
31+
popupOffset: Array as unknown as PropType<[number, number]>,
3232
internalPopupClose: Boolean,
3333
eventKey: String,
3434
expandIcon: Function as PropType<(p?: { isOpen: boolean; [key: string]: any }) => any>,

0 commit comments

Comments
 (0)