1
admin
2026-01-11 fff675a093a912ecdda8e5498421a3e41ab0b596
src/components/Language/index.vue
@@ -37,25 +37,15 @@
      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: "中文(繁体)",
          lang: "zh-Hant"
        },
        {
          text: "日本語にほんご",
          icon: require("@/assets/ico/india.png"),
          lang: "ja",
          text: "हिंदी",
          lang: "hi"
        },
      ],
    };
@@ -63,11 +53,11 @@
  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 +110,4 @@
  font-weight: 600;
  margin: 40px 20px 0 20px;
}
</style>
</style>