From 034e39ef06da042f236cacd44c8ad3c85f2737c1 Mon Sep 17 00:00:00 2001 From: Leon Guan Date: Tue, 28 Sep 2021 00:21:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BD=93=E5=89=8D=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E6=89=80=E5=9C=A8=E8=8F=9C=E5=8D=95=E8=B7=AF=E5=BE=84=E6=98=AF?= =?UTF-8?q?=E5=B5=8C=E5=A5=97=E5=B9=B6=E4=B8=94=E9=9A=90=E8=97=8F=E6=97=B6?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E9=AB=98=E4=BA=AE=E6=A0=B9?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E8=8A=82=E7=82=B9=20(#1201)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复当路由所在菜单路径是嵌套并且隐藏时无法正常高亮根菜单节点的问题。 Fixed #1080 --- src/components/Menu/src/BasicMenu.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Menu/src/BasicMenu.vue b/src/components/Menu/src/BasicMenu.vue index 80cfd70a..0d0e20fb 100644 --- a/src/components/Menu/src/BasicMenu.vue +++ b/src/components/Menu/src/BasicMenu.vue @@ -134,7 +134,9 @@ isClickGo.value = false; return; } - const path = (route || unref(currentRoute)).path; + const path = + (route || unref(currentRoute)).meta?.currentActiveMenu || + (route || unref(currentRoute)).path; setOpenKeys(path); if (unref(currentActiveMenu)) return; if (props.isHorizontal && unref(getSplit)) {