From 031d83828a20b7bc56c1723fe4eaa67fd9d8cd07 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期四, 14 十二月 2023 00:44:12 +0800 Subject: [PATCH] update 代码规范化 --- src/permission.ts | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/permission.ts b/src/permission.ts index 402fdec..2fc105b 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -16,13 +16,13 @@ router.beforeEach(async (to, from, next) => { NProgress.start(); if (getToken()) { - to.meta.title && useSettingsStore().setTitle(to.meta.title as string); + to.meta.title && useSettingsStore().setTitle(to.meta.title); /* has token*/ if (to.path === '/login') { next({ path: '/' }); NProgress.done(); - } else if (whiteList.indexOf(to.path) !== -1) { - next() + } else if (whiteList.indexOf(to.path as string) !== -1) { + next(); } else { if (useUserStore().roles.length === 0) { isRelogin.show = true; -- Gitblit v1.9.3