li.shaoyi vor 7 Monaten
Ursprung
Commit
e60b10e5d6

+ 2 - 1
src/packages/pc/components/layouts/header/index.vue

@@ -85,8 +85,9 @@ const exitFullSreen = () => {
 
 // 切换语言
 const switchLanguage = (lange: Language) => {
-    i18n.global.locale = lange
+    //i18n.global.locale = lange
     localData.setValue('appLanguage', lange)
+    location.reload() // 强制刷新页面
 }
 
 onMounted(() => {

+ 2 - 1
src/packages/pc/views/auth/components/layout/index.vue

@@ -56,8 +56,9 @@ const languageLabel = computed(() => getLanguageLabelByValue(i18n.global.locale)
 
 // 切换语言
 const switchLanguage = (lange: Language) => {
-  i18n.global.locale = lange
+  //i18n.global.locale = lange
   localData.setValue('appLanguage', lange)
+  location.reload() // 强制刷新页面
 }
 </script>