feat: 帮助文档多语言文件上传

This commit is contained in:
TsMask
2023-11-24 14:20:59 +08:00
parent 030254db4e
commit 627e579729
8 changed files with 140 additions and 109 deletions

View File

@@ -8,7 +8,7 @@ import { useRouter, useRoute } from 'vue-router';
import useI18n from '@/hooks/useI18n';
import { toRaw } from 'vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
const { t, changeLocale } = useI18n();
const { t, changeLocale, optionsLocale } = useI18n();
const appStore = useAppStore();
const router = useRouter();
const route = useRoute();
@@ -111,7 +111,7 @@ function fnLocale() {
}
onMounted(() => {
fnLocale()
fnLocale();
fnGetCaptcha();
});
@@ -279,8 +279,9 @@ function fnChangeLocale(e: any) {
</a-button>
<template #overlay>
<a-menu @click="fnChangeLocale">
<a-menu-item key="zh_CN">中文</a-menu-item>
<a-menu-item key="en_US">English</a-menu-item>
<a-menu-item v-for="opt in optionsLocale" :key="opt.value">
{{ opt.label }}
</a-menu-item>
</a-menu>
</template>
</a-dropdown>