From 732c30b33f782c2d2ebb62eacda2fb7a453a7ecd Mon Sep 17 00:00:00 2001
From: admin <344137771@qq.com>
Date: Sat, 31 Jan 2026 11:01:45 +0800
Subject: [PATCH] 1

---
 src/components/Language/index.vue |   33 ++++++---------------------------
 1 files changed, 6 insertions(+), 27 deletions(-)

diff --git a/src/components/Language/index.vue b/src/components/Language/index.vue
index e85284d..0d3ab80 100644
--- a/src/components/Language/index.vue
+++ b/src/components/Language/index.vue
@@ -23,6 +23,8 @@
 </template>
 
 <script>
+import { languageOptions } from "@/config/languageOptions";
+
 /*
  *name onChange
  *回应外面
@@ -34,40 +36,17 @@
       settingDialog: false,
       language: "",
       // 多语言配置
-      actions: [
-        {
-          text: "English",
-          icon: require("@/assets/ico/english.png"),
-          lang: "en",
-        },
-        {
-          text: "繁体中文",
-          icon: require("@/assets/ico/tw.png"),
-          lang: "zh-TW",
-        },
-        { text: "हिंदी", icon: require("@/assets/ico/india.png"), lang: "hi" },
-        { text: "한국인", icon: require("@/assets/ico/india.png"), lang: "ko" },
-        {
-          text: "ภาษาไทย",
-          icon: require("@/assets/ico/india.png"),
-          lang: "th",
-        },
-        {
-          text: "日本語にほんご",
-          icon: require("@/assets/ico/india.png"),
-          lang: "ja",
-        },
-      ],
+      actions: languageOptions,
     };
   },
   mounted() {
     this.$emit(
       "onChange",
-      this.getText(window.localStorage.getItem("language") || "zh-CN")
+      this.getText(window.localStorage.getItem("language"))
     );
   },
   methods: {
-    getText(val) {
+    getText(val = "hi") {
       let arr = this.actions.filter((item) => item.lang === val);
       return arr[0].text;
     },
@@ -120,4 +99,4 @@
   font-weight: 600;
   margin: 40px 20px 0 20px;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3