mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-24 11:05:17 +08:00
feat(components): [el-menu] support customize popper offset (#6049)
* feat(components): [el-menu] support customize popper offset * docs: improve docs
This commit is contained in:
parent
aa639e81f1
commit
4b6e9889de
@ -85,6 +85,7 @@ menu/collapse
|
||||
| hide-timeout | timeout before hiding a sub-menu | number | — | 300 |
|
||||
| disabled | whether the sub-menu is disabled | boolean | — | false |
|
||||
| popper-append-to-body(deprecated) | whether to append the popup menu to body. If the positioning of the menu is wrong, you can try setting this prop | boolean | - | level one SubMenu: true / other SubMenus: false |
|
||||
| popper-offset | offset of the popper | number | — | 6 |
|
||||
|
||||
## SubMenu Slots
|
||||
|
||||
|
@ -46,6 +46,10 @@ export const subMenuProps = buildProps({
|
||||
type: Boolean,
|
||||
default: undefined,
|
||||
},
|
||||
popperOffset: {
|
||||
type: Number,
|
||||
default: 6,
|
||||
},
|
||||
} as const)
|
||||
export type SubMenuProps = ExtractPropTypes<typeof subMenuProps>
|
||||
|
||||
@ -312,7 +316,7 @@ export default defineComponent({
|
||||
visible: opened.value,
|
||||
effect: 'light',
|
||||
pure: true,
|
||||
offset: 6,
|
||||
offset: props.popperOffset,
|
||||
showArrow: false,
|
||||
persistent: true,
|
||||
popperClass: props.popperClass,
|
||||
|
Loading…
Reference in New Issue
Block a user