|
@@ -53,12 +53,14 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</fieldset>
|
|
</fieldset>
|
|
|
- <fieldset class="g-fieldset">
|
|
|
|
|
|
|
+ <fieldset class="g-fieldset" v-if="globalStore.getSystemInfo('i18nEnabled')">
|
|
|
<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')">
|
|
|
- <el-select effect="dark" :placeholder="t('common.choice')" v-model="luanguage" @change="changeLuanguage">
|
|
|
|
|
- <el-option v-for="item in dataList" :key="item.langcode" :label="item.langname" :value="item.langcode"/>
|
|
|
|
|
|
|
+ <el-select effect="dark" :placeholder="t('common.choice')" v-model="luanguage"
|
|
|
|
|
+ @change="changeLuanguage">
|
|
|
|
|
+ <el-option v-for="item in dataList" :key="item.langcode" :label="item.langname"
|
|
|
|
|
+ :value="item.langcode" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -74,13 +76,14 @@
|
|
|
import { ref, computed } from 'vue'
|
|
import { ref, computed } from 'vue'
|
|
|
import { ElMessageBox, FormInstance } from 'element-plus'
|
|
import { ElMessageBox, FormInstance } from 'element-plus'
|
|
|
import { getBuyOrSellList } from '@/constants/order'
|
|
import { getBuyOrSellList } from '@/constants/order'
|
|
|
-import { useSettingStore, i18n } from '@/stores'
|
|
|
|
|
|
|
+import { useGlobalStore, useSettingStore, i18n } from '@/stores'
|
|
|
import { localData } from '@/stores/storage'
|
|
import { localData } from '@/stores/storage'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { getI18nConfigs } from '@/services/api/common'
|
|
import { getI18nConfigs } from '@/services/api/common'
|
|
|
import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
|
import eventBus from '@/services/bus'
|
|
import eventBus from '@/services/bus'
|
|
|
|
|
|
|
|
|
|
+const globalStore = useGlobalStore()
|
|
|
const settingStore = useSettingStore()
|
|
const settingStore = useSettingStore()
|
|
|
const formRef = ref<FormInstance>()
|
|
const formRef = ref<FormInstance>()
|
|
|
const show = ref(true)
|
|
const show = ref(true)
|
|
@@ -109,18 +112,18 @@ const { dataList } = useRequest(getI18nConfigs, {})
|
|
|
const changeLuanguage = (e: string) => {
|
|
const changeLuanguage = (e: string) => {
|
|
|
ElMessageBox.confirm(t('user.login.tips6'), t('common.tips'), { confirmButtonText: t('common.ikonw'), cancelButtonText: t('operation.cancel') }).then(() => {
|
|
ElMessageBox.confirm(t('user.login.tips6'), t('common.tips'), { confirmButtonText: t('common.ikonw'), cancelButtonText: t('operation.cancel') }).then(() => {
|
|
|
switch (e) {
|
|
switch (e) {
|
|
|
- case 'zh-CN':
|
|
|
|
|
- i18n.global.locale = 'zh-CN'
|
|
|
|
|
- break;
|
|
|
|
|
- case 'en':
|
|
|
|
|
- i18n.global.locale = 'en-US'
|
|
|
|
|
- break;
|
|
|
|
|
- case 'zh-TW':
|
|
|
|
|
- i18n.global.locale ='zh-TW'
|
|
|
|
|
- break;
|
|
|
|
|
- default:
|
|
|
|
|
- i18n.global.locale = 'th'
|
|
|
|
|
- break;
|
|
|
|
|
|
|
+ case 'zh-CN':
|
|
|
|
|
+ i18n.global.locale = 'zh-CN'
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'en':
|
|
|
|
|
+ i18n.global.locale = 'en-US'
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'zh-TW':
|
|
|
|
|
+ i18n.global.locale = 'zh-TW'
|
|
|
|
|
+ break;
|
|
|
|
|
+ default:
|
|
|
|
|
+ i18n.global.locale = 'th'
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
/// 设置语言
|
|
/// 设置语言
|
|
|
localData.setValue('appLanguage', i18n.global.locale)
|
|
localData.setValue('appLanguage', i18n.global.locale)
|