Commit 034e39ef06da042f236cacd44c8ad3c85f2737c1
Committed by
GitHub
1 parent
bfdbccfe
fix: 当前路由所在菜单路径是嵌套并且隐藏时无法正常高亮根菜单节点 (#1201)
修复当路由所在菜单路径是嵌套并且隐藏时无法正常高亮根菜单节点的问题。 Fixed #1080
Showing
1 changed file
with
3 additions
and
1 deletions
src/components/Menu/src/BasicMenu.vue
... | ... | @@ -134,7 +134,9 @@ |
134 | 134 | isClickGo.value = false; |
135 | 135 | return; |
136 | 136 | } |
137 | - const path = (route || unref(currentRoute)).path; | |
137 | + const path = | |
138 | + (route || unref(currentRoute)).meta?.currentActiveMenu || | |
139 | + (route || unref(currentRoute)).path; | |
138 | 140 | setOpenKeys(path); |
139 | 141 | if (unref(currentActiveMenu)) return; |
140 | 142 | if (props.isHorizontal && unref(getSplit)) { | ... | ... |