From c836ede0b23adbed78ed76c7b71ee1912e6f45f8 Mon Sep 17 00:00:00 2001 From: zhongzm Date: Thu, 13 Feb 2025 15:34:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BB=AA=E8=A1=A8=E7=9B=98=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=AD=E8=8B=B1=E4=BF=AE=E5=A4=8D=EF=BC=88=E6=9A=82?= =?UTF-8?q?=E6=97=B6=E5=88=B7=E6=96=B0=E7=95=8C=E9=9D=A2=E5=A4=84=E7=90=86?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/app/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/store/modules/app/index.ts b/src/store/modules/app/index.ts index 498f82b..4db3aef 100644 --- a/src/store/modules/app/index.ts +++ b/src/store/modules/app/index.ts @@ -58,9 +58,15 @@ export const useAppStore = defineStore(SetupStoreId.App, () => { ]; function changeLocale(lang: App.I18n.LangType) { + if (locale.value === lang) return; + locale.value = lang; setLocale(lang); localStg.set('lang', lang); + + setTimeout(() => { + window.location.reload(); + }, 100); } /** Update document title by locale */