From 028710bcb9fa3f321c68e54927c472a1575a9273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Mon, 11 Nov 2024 15:47:43 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E4=BC=98=E5=8C=96=E5=89=8D=E5=8F=B0?= =?UTF-8?q?=E9=A1=B6=E6=A0=8F=E8=8F=9C=E5=8D=95=E8=A2=AB=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=97=B6=E6=97=A0=E9=9C=80=E6=BF=80=E6=B4=BB=E7=9A=84=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E9=A1=B9=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/layouts/frontend/components/menu.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/src/layouts/frontend/components/menu.vue b/web/src/layouts/frontend/components/menu.vue index b9706119..919a56c4 100644 --- a/web/src/layouts/frontend/components/menu.vue +++ b/web/src/layouts/frontend/components/menu.vue @@ -120,7 +120,11 @@ const setActiveMenu = (route: RouteLocationNormalizedLoaded) => { * 检查菜单是否需要激活,如果否,还原 state.activeMenu */ const onSelect = (index: string) => { - if (noNeedActive(siteConfig.headNav, index) || noNeedActive(memberCenter.state.navUserMenus, index)) { + if ( + noNeedActive(siteConfig.headNav, index) || + noNeedActive(memberCenter.state.navUserMenus, index) || + noNeedActive(memberCenter.state.viewRoutes, index) + ) { const oldActiveMenu = state.activeMenu state.activeMenu = '' nextTick(() => {