bug: 去掉无用的入参
This commit is contained in:
parent
f190f0ebea
commit
8e35143058
@ -201,7 +201,8 @@ const filterRoutesByPermission = (routes: RouteRecordRaw[], permissions: string[
|
||||
const whiteList = ['Index', 'Admin', 'Message', 'LoginPage', 'Login']
|
||||
|
||||
// 路由守卫
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
router.beforeEach(async (to, _, next) => {
|
||||
// 使用 _ 来忽略 from 参数
|
||||
if (to.name && whiteList.includes(to.name as string)) {
|
||||
next()
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user