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, }); });