From cd265f1d56fdcb5fd3b55a75308db9f9a2e5a212 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 8 Jan 2025 18:49:40 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E9=BB=98=E8=AE=A4=E8=AF=AD=E8=A8=80=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/store/modules/user.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/core-frontend/src/store/modules/user.ts b/core/core-frontend/src/store/modules/user.ts index 8047185807..00dc6dd96a 100644 --- a/core/core-frontend/src/store/modules/user.ts +++ b/core/core-frontend/src/store/modules/user.ts @@ -64,6 +64,10 @@ export const userStore = defineStore('user', { this[key] = data[dkey] wsCache.set('user.' + key, this[key]) }) + const locale = useLocaleStoreWithOut() + if (locale.getCurrentLocale?.lang !== this.language) { + window.location.reload() + } this.setLanguage(this.language) }, setToken(token: string) {