This commit is contained in:
Your Name
2026-03-23 18:02:16 +08:00
parent 18fee2e8f8
commit 250d173c2f
525 changed files with 10659 additions and 793 deletions
-13
View File
@@ -2,10 +2,6 @@
* 权限控制
*/
import 'nprogress/nprogress.css'
import NProgress from 'nprogress'
import config from './config'
import { PageEnum } from './enums/pageEnum'
import router, { findFirstValidRoute } from './router'
@@ -51,16 +47,11 @@ const addRoutesRecursively = (routes: any, parentPath = '') => {
}
}
// NProgress配置
NProgress.configure({ showSpinner: false })
const loginPath = PageEnum.LOGIN
const defaultPath = PageEnum.INDEX
// 免登录白名单
const whiteList: string[] = [PageEnum.LOGIN, PageEnum.ERROR_403]
router.beforeEach(async (to, from, next) => {
// 开始 Progress Bar
NProgress.start()
document.title = to.meta.title ?? config.title
const userStore = useUserStore()
const tabsStore = useTabsStore()
@@ -105,7 +96,3 @@ router.beforeEach(async (to, from, next) => {
next({ path: loginPath, query: { redirect: to.fullPath } })
}
})
router.afterEach(() => {
NProgress.done()
})