From 58b0f1e9bd03a472321acf1dfc4e89fc4ce9df7a Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Mon, 29 Sep 2025 01:14:10 +0800
Subject: [PATCH] 9.28更换api
---
src/components/Language/index.vue | 40 +++++++++++++++++-----------------------
1 files changed, 17 insertions(+), 23 deletions(-)
diff --git a/src/components/Language/index.vue b/src/components/Language/index.vue
index e85284d..2695076 100644
--- a/src/components/Language/index.vue
+++ b/src/components/Language/index.vue
@@ -3,7 +3,7 @@
<van-popup
v-model="settingDialog"
position="bottom"
- :style="{ height: '35%' }"
+ :style="{ height: '35%', backgroundColor: '#444' }"
@close="popClose"
>
<div
@@ -37,38 +37,32 @@
actions: [
{
text: "English",
- icon: require("@/assets/ico/english.png"),
- lang: "en",
+ 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: "中文(繁体)",
+ lang: "zh-Hant"
},
{
- text: "日本語にほんご",
- icon: require("@/assets/ico/india.png"),
- lang: "ja",
+ text: "中文",
+ lang: "zh-CN"
},
- ],
+ // {
+ // text: "हिंदी",
+ // lang: "hi"
+ // }
+ ]
};
},
mounted() {
this.$emit(
"onChange",
- this.getText(window.localStorage.getItem("language") || "zh-CN")
+ this.getText(window.localStorage.getItem("language"))
);
},
methods: {
- getText(val) {
- let arr = this.actions.filter((item) => item.lang === val);
+ getText(val = "hi") {
+ let arr = this.actions.filter(item => item.lang === val);
return arr[0].text;
},
qkclick(e) {
@@ -79,8 +73,8 @@
},
popClose() {
this.settingDialog = false;
- },
- },
+ }
+ }
};
</script>
@@ -120,4 +114,4 @@
font-weight: 600;
margin: 40px 20px 0 20px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3