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 ### Menu.SubMenu
| Param | Description | Type | Default value | Version | | Param | Description | Type | Default value | Version |
| -------------- | ----------------------------------- | ------------ | ------------- | ------- | | --- | --- | --- | --- | --- |
| disabled | whether sub menu is disabled or not | boolean | false | | | disabled | whether sub menu is disabled or not | boolean | false | |
| expandIcon | Customized expandIcon | slot | arrow icon | | | | expandIcon | Customized expandIcon | slot | arrow icon | | |
| key | Unique ID of the sub menu, required | string | | | | key | Unique ID of the sub menu, required | string | | |
| popupClassName | Sub-menu class name | string | | 1.5.0 | | popupClassName | Sub-menu class name | string | | 1.5.0 |
| title | title of the sub menu | string\|slot | | | | 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`. 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 ### Menu.SubMenu
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
| -------------- | ------------------------ | ------------ | -------- | ----- | | -------------- | ------------------------------------ | ----------------- | -------- | ----- |
| disabled | 是否禁用 | boolean | false | | | disabled | 是否禁用 | boolean | false | |
| expandIcon | 自定义 Menu 展开收起图标 | slot | 箭头图标 | | | expandIcon | 自定义 Menu 展开收起图标 | slot | 箭头图标 | |
| icon | 菜单图标 | slot | | 2.8.0 | | icon | 菜单图标 | slot | | 2.8.0 |
| key | 唯一标志, 必填 | string | | | | key | 唯一标志, 必填 | string | | |
| popupClassName | 子菜单样式 | string | | 1.5.0 | | popupClassName | 子菜单样式 | string | | 1.5.0 |
| title | 子菜单项值 | string\|slot | | | | popupOffset | 子菜单偏移量,`mode="inline"` 时无效 | \[number, number] | - | |
| title | 子菜单项值 | string\|slot | | |
Menu.SubMenu 的子元素必须是 `MenuItem` 或者 `SubMenu`. Menu.SubMenu 的子元素必须是 `MenuItem` 或者 `SubMenu`.

2
components/menu/src/SubMenu.tsx

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

Loading…
Cancel
Save