liyongli 6 dni temu
rodzic
commit
12e8b3d1be
2 zmienionych plików z 7 dodań i 8 usunięć
  1. 6 6
      src/view/fenghui/index.vue
  2. 1 2
      src/view/fenghui/lang.js

+ 6 - 6
src/view/fenghui/index.vue

@@ -59,17 +59,17 @@ let langDefaute = true;
 let langDefauteType = langSelect.value;
 
 const subData = ref({})
-
-const langObj = [
-    { text: '中文', value: 'zh' },
-    { text: 'English', value: 'en' },
-    // { text: 'Español', value: 'es' },
-]
+const langkeys = Object.keys(lang);
+// 如需要添加语言,需要在这里添加
 const langObjT = {
     zh: '中文',
     en: 'English',
     es: 'Español',
 }
+const langObj = langkeys.map((item) => {
+    return { text: langObjT[item], value: item }
+})
+
 const saveData = (code, verification, data) => {
     if (code !== undefined) {
         componentId.value = code;

+ 1 - 2
src/view/fenghui/lang.js

@@ -311,6 +311,5 @@ export default {
             { "text": "Comprehensive Support Group - Volunteers", "value": "综合保障组-志愿者" },
             { "text": "Comprehensive Support Group - Others", "value": "综合保障组-其他" }
         ]
-    },
-    "es": {}
+    }
 }