|
|
@@ -15,6 +15,14 @@
|
|
|
<app-iconfont icon="g-icon-cancel">{{ $t('routes.usercancel') }}</app-iconfont>
|
|
|
</template>
|
|
|
</Cell>
|
|
|
+ <Cell is-link @click="changeLuanguage">
|
|
|
+ <template #title>
|
|
|
+ <app-iconfont icon="g-icon-cancel">{{ $t('mine.setting.language') }}</app-iconfont>
|
|
|
+ </template>
|
|
|
+ <template #value>
|
|
|
+ <span>{{ i18n.global.locale === 'zh-CN' ? $t('mine.setting.chinese') : $t('mine.setting.english') }}</span>
|
|
|
+ </template>
|
|
|
+ </Cell>
|
|
|
</CellGroup>
|
|
|
</div>
|
|
|
</app-view>
|
|
|
@@ -23,6 +31,15 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { Cell, CellGroup } from 'vant'
|
|
|
import AppIconfont from '@/components/base/iconfont/index.vue'
|
|
|
+import { i18n } from '@/stores'
|
|
|
+
|
|
|
+const changeLuanguage = () => {
|
|
|
+ if ( i18n.global.locale === 'zh-CN' ) {
|
|
|
+ i18n.global.locale = 'en-US'
|
|
|
+ } else {
|
|
|
+ i18n.global.locale = 'zh-CN'
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
defineProps({
|
|
|
showCancel: {
|