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

@@ -16,10 +16,23 @@ export default function useLocale() {
const changeLocale = (value: string) => {
i18n.locale.value = value;
localSet(CACHE_LOCAL_I18N, value);
window.location.reload()
window.location.reload();
};
// 可选的语言
const optionsLocale= [
{
value: 'zh_CN',
label: '中文',
},
{
value: 'en_US',
label: 'English',
},
];
return {
optionsLocale,
currentLocale,
changeLocale,
t: i18n.t,