From 100f44e197dd99ff63220e2fa05d5c564f278aa6 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期日, 12 一月 2025 20:54:58 +0800 Subject: [PATCH] fix 修复 切换租户 tabs过多导致卡住问题 --- src/layout/components/Navbar.vue | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index bfe339e..f821448 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -98,7 +98,7 @@ import { dynamicClear, dynamicTenant } from '@/api/system/tenant'; import { TenantVO } from '@/api/types'; import notice from './notice/index.vue'; -import router from "@/router"; +import router from '@/router'; const appStore = useAppStore(); const userStore = useUserStore(); @@ -127,18 +127,18 @@ if (companyName.value != null && companyName.value !== '') { await dynamicTenant(tenantId); dynamic.value = true; - proxy?.$tab.closeAllPage(); - proxy?.$router.push('/'); - proxy?.$tab.refreshPage(); + await proxy?.$router.push('/'); + await proxy?.$tab.closeAllPage(); + await proxy?.$tab.refreshPage(); } }; const dynamicClearEvent = async () => { await dynamicClear(); dynamic.value = false; - proxy?.$tab.closeAllPage(); - proxy?.$router.push('/'); - proxy?.$tab.refreshPage(); + await proxy?.$router.push('/'); + await proxy?.$tab.closeAllPage(); + await proxy?.$tab.refreshPage(); }; /** 绉熸埛鍒楄〃 */ @@ -170,7 +170,7 @@ query: { redirect: encodeURIComponent(router.currentRoute.value.fullPath || '/') } - }) + }); }); }; -- Gitblit v1.9.3