fix: 首次访问获取客户端默认语言/静态路由title

This commit is contained in:
TsMask
2023-11-20 18:12:29 +08:00
parent 9fdd322757
commit e9054e320f
13 changed files with 142 additions and 35 deletions

View File

@@ -21,9 +21,9 @@ let state = reactive({
/**表单属性 */
from: {
/**账号 */
username: '',
username: 'supervisor',
/**密码 */
password: '',
password: 'rootaa',
/**验证码 */
code: '',
/**验证码uuid */
@@ -96,10 +96,22 @@ const calcBG = computed(() => {
backgroundSize: 'cover',
};
}
return undefined
return undefined;
});
/**
* 国际化翻译转换
*/
function fnLocale() {
let title = route.meta.title as string;
if (title.indexOf('router.') !== -1) {
title = t(title);
}
appStore.setTitle(title);
}
onMounted(() => {
fnLocale()
fnGetCaptcha();
});