From abc6e4f454214e48e040de3a0bca1db12a7f719f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 6 Mar 2025 23:08:06 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 11 ++++++----- src/store/modules/user.ts | 4 ---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 01cc22e..8b0468c 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -99,6 +99,7 @@ import { dynamicClear, dynamicTenant } from '@/api/system/tenant'; import { TenantVO } from '@/api/types'; import notice from './notice/index.vue'; import router from '@/router'; +import {ElMessageBoxOptions} from "element-plus/es/components/message-box/src/message-box.type"; const appStore = useAppStore(); const userStore = useUserStore(); @@ -128,8 +129,8 @@ const dynamicTenantEvent = async (tenantId: string) => { await dynamicTenant(tenantId); dynamic.value = true; await proxy?.$router.push('/'); - await proxy?.proxy.$tab.closeAllPage(); - await proxy?.proxy.$tab.refreshPage(); + await proxy?.$tab.closeAllPage(); + await proxy?.$tab.refreshPage(); } }; @@ -137,8 +138,8 @@ const dynamicClearEvent = async () => { await dynamicClear(); dynamic.value = false; await proxy?.$router.push('/'); - await proxy?.proxy.$tab.closeAllPage(); - await proxy?.proxy.$tab.refreshPage(); + await proxy?.$tab.closeAllPage(); + await proxy?.$tab.refreshPage(); }; /** 租户列表 */ @@ -163,7 +164,7 @@ const logout = async () => { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' - }); + } as ElMessageBoxOptions); userStore.logout().then(() => { router.replace({ path: '/login', diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 56f369b..f6279b7 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -85,7 +85,3 @@ export const useUserStore = defineStore('user', () => { }); export default useUserStore; -// 非setup -export function useUserStoreHook() { - return useUserStore(store); -}