mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-17 11:49:41 +08:00
fix(components): [menu] expand active menu item (#9069)
* fix(components): [menu] expand active menu item * chore: update
This commit is contained in:
parent
7da11bc2e6
commit
50da145b2b
@ -209,7 +209,6 @@ export default defineComponent({
|
||||
|
||||
if (item) {
|
||||
activeIndex.value = item.index
|
||||
initMenu()
|
||||
} else {
|
||||
activeIndex.value = val
|
||||
}
|
||||
@ -236,6 +235,8 @@ export default defineComponent({
|
||||
}
|
||||
)
|
||||
|
||||
watch(items.value, initMenu)
|
||||
|
||||
let resizeStopper: UseResizeObserverReturn['stop']
|
||||
watchEffect(() => {
|
||||
if (props.mode === 'horizontal' && props.ellipsis)
|
||||
@ -290,7 +291,6 @@ export default defineComponent({
|
||||
|
||||
// lifecycle
|
||||
onMounted(() => {
|
||||
initMenu()
|
||||
if (props.mode === 'horizontal') {
|
||||
new Menubar(instance.vnode.el!, nsMenu.namespace.value)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user