From eeb8f18b48989bac5eb5847a51359496956c5339 Mon Sep 17 00:00:00 2001
From: 李 <344137771@qq.com>
Date: Thu, 30 Apr 2026 18:32:45 +0800
Subject: [PATCH] 1
---
src/components/Language/index.vue | 35 +++++++----------------------------
1 files changed, 7 insertions(+), 28 deletions(-)
diff --git a/src/components/Language/index.vue b/src/components/Language/index.vue
index e85284d..a030737 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;
},
@@ -109,7 +88,7 @@
}
.btn_s_box {
border: none;
- background: #409eff;
+ background: #00f0ff;
color: #fff;
height: 70px;
width: 100%;
@@ -120,4 +99,4 @@
font-weight: 600;
margin: 40px 20px 0 20px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3