| | |
| | | actions: [ |
| | | { |
| | | text: "English", |
| | | icon: require("@/assets/ico/english.png"), |
| | | lang: "en", |
| | | }, |
| | | { |
| | | text: "繁体中文", |
| | | icon: require("@/assets/ico/tw.png"), |
| | | lang: "zh-TW", |
| | | text: "简体中文", |
| | | lang: "zh-CN", |
| | | }, |
| | | { 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", |
| | | }, |
| | | // { text: "हिंदी", lang: "hi" }, |
| | | // { |
| | | // text: "Deutsch", |
| | | // lang: "de", |
| | | // }, //德语 |
| | | // { |
| | | // text: "Français", |
| | | // lang: "fr", |
| | | // }, //法语 |
| | | // { |
| | | // text: "日本語にほんご", |
| | | // lang: "ja", |
| | | // }, |
| | | ], |
| | | }; |
| | | }, |
| | | 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; |
| | | }, |
| | |
| | | font-weight: 600; |
| | | margin: 40px 20px 0 20px; |
| | | } |
| | | </style> |
| | | </style> |