feat(components): [menu] apply popper-class and popper-style to the tooltip of the title (#22908)

* feat: apply popper-class and popper-style to the tooltip of the title

* docs: update

* docs: update
This commit is contained in:
Rainbow
2025-12-02 08:18:32 +08:00
committed by GitHub
parent bcb97b287d
commit 32f8739312
2 changed files with 5 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ menu/collapse
## Popper Offset ^(2.4.4)
Menu with popperOffset will override Submenu's `popper-offset`.
Submenu with popperOffset will override Menu's `popper-offset`.
:::demo
@@ -86,8 +86,8 @@ menu/popper-offset
| collapse-transition | whether to enable the collapse transition | ^[boolean] | true |
| popper-effect ^(2.2.26) | Tooltip theme, built-in theme: `dark` / `light` when menu is collapsed | ^[enum]`'dark' \| 'light'` / ^[string] | dark |
| close-on-click-outside ^(2.4.4) | optional, whether menu is collapsed when clicking outside | ^[boolean] | false |
| popper-class ^(2.5.0) | custom class name for all popup menus | ^[string] | — |
| popper-style ^(2.11.5) | custom style for all popup menus | ^[string] / ^[object] | — |
| popper-class ^(2.5.0) | custom class name for all popup menus and titles' tooltips | ^[string] | — |
| popper-style ^(2.11.5) | custom style for all popup menus and titles' tooltips | ^[string] / ^[object] | — |
| show-timeout ^(2.5.0) | control timeout for all menus before showing | ^[number] | 300 |
| hide-timeout ^(2.5.0) | control timeout for all menus before hiding | ^[number] | 300 |
| background-color ^(deprecated) | background color of Menu (hex format) (use `--el-menu-bg-color` in a style class instead) | ^[string] | #ffffff |

View File

@@ -18,6 +18,8 @@
:effect="rootMenu.props.popperEffect"
placement="right"
:fallback-placements="['left']"
:popper-class="rootMenu.props.popperClass"
:popper-style="rootMenu.props.popperStyle"
:persistent="rootMenu.props.persistent"
focus-on-target
>