From eba762c023e91118e2352ea35317d017c3cc58bc Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Mon, 7 Oct 2024 17:51:53 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=9C=80=E8=A6=81=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/store/auth.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/web-antd/src/store/auth.ts b/apps/web-antd/src/store/auth.ts index 41d380f4..95da371f 100644 --- a/apps/web-antd/src/store/auth.ts +++ b/apps/web-antd/src/store/auth.ts @@ -13,6 +13,8 @@ import { defineStore } from 'pinia'; import { doLogout, getUserInfoApi, loginApi, seeConnectionClose } from '#/api'; import { $t } from '#/locales'; +import { useDictStore } from './dict'; + export const useAuthStore = defineStore('auth', () => { const accessStore = useAccessStore(); const userStore = useUserStore(); @@ -79,6 +81,9 @@ export const useAuthStore = defineStore('auth', () => { } catch (error) { console.error(error); } finally { + // 需要清除字典缓存 + const dictStore = useDictStore(); + dictStore.resetCache(); resetAllStores(); accessStore.setLoginExpired(false);