From db1f26e9dae49fdadd717feb80962ba442f91cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E4=B8=87?= <52823142+Ten-K@users.noreply.github.com> Date: Mon, 18 Apr 2022 10:27:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B7=AF=E7=94=B1=E5=8F=98=E5=8C=96?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A0=87=E7=AD=BE=E9=A1=B5=20(#243)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/sidebar/horizontal.vue | 7 +++++++ src/layout/components/sidebar/vertical.vue | 1 + 2 files changed, 8 insertions(+) diff --git a/src/layout/components/sidebar/horizontal.vue b/src/layout/components/sidebar/horizontal.vue index 32f2951f6..b252e4bcc 100644 --- a/src/layout/components/sidebar/horizontal.vue +++ b/src/layout/components/sidebar/horizontal.vue @@ -47,6 +47,13 @@ watch( } ); +watch( + () => route.path, + () => { + menuSelect(route.path, routers); + } +); + function translationCh() { instance.locale = { locale: "zh" }; locale.value = "zh"; diff --git a/src/layout/components/sidebar/vertical.vue b/src/layout/components/sidebar/vertical.vue index bdef950a2..94b81085c 100644 --- a/src/layout/components/sidebar/vertical.vue +++ b/src/layout/components/sidebar/vertical.vue @@ -51,6 +51,7 @@ watch( () => route.path, () => { getSubMenuData(route.path); + menuSelect(route.path, routers); } );