|
@@ -57,7 +57,11 @@
|
|
|
<legend class="g-fieldset__legend">{{ t('mine.setting.others') }}</legend>
|
|
<legend class="g-fieldset__legend">{{ t('mine.setting.others') }}</legend>
|
|
|
<el-form ref="formRef" class="el-form--horizontal" label-width="80px">
|
|
<el-form ref="formRef" class="el-form--horizontal" label-width="80px">
|
|
|
<el-form-item :label="t('mine.setting.language')">
|
|
<el-form-item :label="t('mine.setting.language')">
|
|
|
- <span @click="changeLuanguage">{{ i18n.global.locale === 'zh-CN' ? t('mine.setting.chinese') : t('mine.setting.english') }}</span>
|
|
|
|
|
|
|
+ <el-select effect="dark" :placeholder="t('common.choice')" v-model="luanguage" @change="changeLuanguage">
|
|
|
|
|
+ <el-option :label="t('mine.setting.chinese')" value="zh-CN" />
|
|
|
|
|
+ <el-option :label="t('mine.setting.english')" value="en-US" />
|
|
|
|
|
+ <el-option :label="t('mine.setting.enth')" value="th-TH" />
|
|
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</fieldset>
|
|
</fieldset>
|
|
@@ -83,17 +87,15 @@ const show = ref(true)
|
|
|
const formData = ref({ ...settingStore.userSetting })
|
|
const formData = ref({ ...settingStore.userSetting })
|
|
|
const { t } = i18n.global
|
|
const { t } = i18n.global
|
|
|
|
|
|
|
|
|
|
+const luanguage = i18n.global.locale
|
|
|
|
|
+
|
|
|
const onCancel = () => {
|
|
const onCancel = () => {
|
|
|
show.value = false
|
|
show.value = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const changeLuanguage = () => {
|
|
|
|
|
- ElMessageBox.confirm(t('user.login.tips6'), t('common.tips'), { confirmButtonText: t('common.ikonw') }).then(() => {
|
|
|
|
|
- if (i18n.global.locale === 'zh-CN') {
|
|
|
|
|
- i18n.global.locale = 'en-US'
|
|
|
|
|
- } else {
|
|
|
|
|
- i18n.global.locale = 'zh-CN'
|
|
|
|
|
- }
|
|
|
|
|
|
|
+const changeLuanguage = (e) => {
|
|
|
|
|
+ ElMessageBox.confirm(t('user.login.tips6'), t('common.tips'), { confirmButtonText: t('common.ikonw'), cancelButtonText: t('operation.cancel') }).then(() => {
|
|
|
|
|
+ i18n.global.locale = e
|
|
|
/// 设置语言
|
|
/// 设置语言
|
|
|
localData.setValue('appLanguage', i18n.global.locale)
|
|
localData.setValue('appLanguage', i18n.global.locale)
|
|
|
/// 重新登出
|
|
/// 重新登出
|