From 93661e24c82318825c2df4923bba4f3ea80109b0 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Fri, 25 Aug 2023 10:21:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=8F=9C=E5=8D=95):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E8=B7=AF=E7=94=B1=E6=9C=AA=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=AB=98=E4=BA=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/business/ms-top-menu/index.vue | 5 ++++- frontend/src/hooks/useLeaveUnSaveTip.ts | 5 ----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/business/ms-top-menu/index.vue b/frontend/src/components/business/ms-top-menu/index.vue index 02988adbb7..b57bb63ba1 100644 --- a/frontend/src/components/business/ms-top-menu/index.vue +++ b/frontend/src/components/business/ms-top-menu/index.vue @@ -4,7 +4,7 @@ v-model:selected-keys="activeMenus" class="bg-transparent" mode="horizontal" - @menu-item-click="setCurrentTopMenu" + @menu-item-click="menuClickHandler" > {{ t(menu.meta?.locale || '') }} @@ -92,6 +92,9 @@ function jumpPath(route: RouteRecordName | undefined) { router.push({ name: route }); } + function menuClickHandler() { + activeMenus.value = [appStore.getCurrentTopMenu?.name || '']; + } diff --git a/frontend/src/hooks/useLeaveUnSaveTip.ts b/frontend/src/hooks/useLeaveUnSaveTip.ts index b34079e2dd..b3b923763f 100644 --- a/frontend/src/hooks/useLeaveUnSaveTip.ts +++ b/frontend/src/hooks/useLeaveUnSaveTip.ts @@ -11,7 +11,6 @@ export default function useLeaveUnSaveTip() { if (to.path === from.path) { return; } - console.log(from); openModal({ type: 'error', title: t('common.unSaveLeaveTitle'), @@ -24,10 +23,6 @@ export default function useLeaveUnSaveTip() { onBeforeOk: async () => { next(); }, - onCancel: () => { - console.log('取消取消'); - console.log(from); - }, hideCancel: false, }); });