doc: submenu popupOffset, close #5312

pull/4696/head
tangjinzhou 2022-03-12 10:33:04 +08:00
parent fc3bd1cba0
commit ce00829d85
3 changed files with 18 additions and 16 deletions

View File

@ -72,11 +72,12 @@ 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 |
| 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`.

View File

@ -73,12 +73,13 @@ 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 |
| popupOffset | 子菜单偏移量,`mode="inline"` 时无效 | \[number, number] | - | |
| title | 子菜单项值 | string\|slot | | |
Menu.SubMenu 的子元素必须是 `MenuItem` 或者 `SubMenu`.

View File

@ -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>,