Commit 034e39ef06da042f236cacd44c8ad3c85f2737c1

Authored by Leon Guan
Committed by GitHub
1 parent bfdbccfe

fix: 当前路由所在菜单路径是嵌套并且隐藏时无法正常高亮根菜单节点 (#1201)

修复当路由所在菜单路径是嵌套并且隐藏时无法正常高亮根菜单节点的问题。

Fixed #1080
src/components/Menu/src/BasicMenu.vue
@@ -134,7 +134,9 @@ @@ -134,7 +134,9 @@
134 isClickGo.value = false; 134 isClickGo.value = false;
135 return; 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 setOpenKeys(path); 140 setOpenKeys(path);
139 if (unref(currentActiveMenu)) return; 141 if (unref(currentActiveMenu)) return;
140 if (props.isHorizontal && unref(getSplit)) { 142 if (props.isHorizontal && unref(getSplit)) {