feat: 帮助文档多语言文件上传
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user