fix: 处理router.多语言显示

This commit is contained in:
TsMask committed 2023-11-17 11:16:08 +08:00
1 parent 69bd3879b1
commit bb577bef0b
5 files changed
+69 -6

No files matched your search

+3 -2
View File
@@ -118,8 +118,9 @@ const router = createRouter({
/**全局路由-后置守卫 */
router.afterEach((to, from, failure) => {
NProgress.done();
const title = to.meta?.title
// 设置标题
if (to.meta?.title) {
if (!failure && title) {
useAppStore().setTitle(to.meta.title);
}
});
@@ -132,7 +133,7 @@ router.beforeEach((to, from, next) => {
NProgress.start();
const token = getToken();
// 获取系统配置信息
const appStore = useAppStore();
const appStore =useAppStore()
if (!appStore.loginBackground) {
appStore.fnSysConf();
}