build: Add conventional-changelog-cli plugin

This commit is contained in:
陈凯龙
2022-02-21 15:05:58 +08:00
parent b2924190b8
commit 384485f699
6 changed files with 841 additions and 128 deletions

View File

@@ -27,7 +27,7 @@ router.beforeEach(async (to, from, next) => {
next({ path: '/' })
} else {
if (permissionStore.getIsAddRouters) {
to.path === '/' ? next({ path: permissionStore.addRouters[0]?.path as string }) : next()
next()
return
}
@@ -46,11 +46,11 @@ router.beforeEach(async (to, from, next) => {
const redirect = decodeURIComponent(redirectPath as string)
const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect }
permissionStore.setIsAddRouters(true)
next(to.path === '/' ? { path: permissionStore.addRouters[0]?.path as string } : nextData)
next(nextData)
}
} else {
if (whiteList.indexOf(to.path) !== -1) {
to.path === '/' ? next({ path: permissionStore.addRouters[0]?.path as string }) : next()
next()
} else {
next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页
}