From 1ff9e27b020822168a95edd83be567e7153837f3 Mon Sep 17 00:00:00 2001
From: chengkun <chengkun@ishangstudy.com>
Date: Tue, 09 Sep 2025 15:20:12 +0800
Subject: [PATCH] 提交

---
 public/static/vue/mixin.js |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/public/static/vue/mixin.js b/public/static/vue/mixin.js
index 6e2e6d8..942b5cc 100644
--- a/public/static/vue/mixin.js
+++ b/public/static/vue/mixin.js
@@ -14,18 +14,18 @@
                 { id: 2, name_loc: 'English', symbol: 'en-us' },
                 // { id: 3, name_loc: 'ar', symbol: 'ar' },
             ],
-            currentLang: '',
+            currentLang: 'zh-cn',
             i18n: i18n.global, // 引入i18n实例
         }
     },
 
     // 生命周期 - 创建完成(可以访问当前this实例)
     mounted() {
+        this.currentLang = this.i18n.locale || 'zh-cn';
     },
 
     // 创建生命周期
     created() {
-        this.currentLang = this.i18n.locale || 'zh-cn';
     },
 
     // 方法
@@ -33,7 +33,8 @@
         ///// 切换语言 /////
         changeLanguage(newLang) {
             this.i18n.locale = newLang;
-            this.i18n.currentLocale = newLang;
+            // this.i18n.currentLocale = newLang;
+            this.currentLocale = newLang;
             localStorage.setItem('changjiang-park-lang', newLang);
             window.location.reload();
         },

--
Gitblit v1.9.0