有谁知道我为什么收到这个警告?
[Vue路由器警告]:启动路由器时出现意外错误:错误:缺少必需的参数“catchAll”
router.beforeEach((to, from, next) => {
const isAuthenticated = store.getters['users/isAuthenticated']
if (!isAuthenticated && to.name !== 'Login' && to.name !== 'Registration' && to.name !== '404') {
next({
name: 'Login'
})
} else if (isAuthenticated && store.getters['users/getUserName'] !== to.params.userName) {
next({
name: '404'
})
} else {
next()
}
})