vue-router.esm.js?ccee:1905 <failed to convert exception to string> 解决: next('/')会死循环。 应该:
router.beforeEach((to, from, next) => {
// 如果定义了beforeEach,没有next,访问将空白。
if (to.path !== '/') {
return next('/')
}
next()
}
vue-router.esm.js?ccee:1905 <failed to convert exception to string> 解决: next('/')会死循环。 应该:
router.beforeEach((to, from, next) => {
// 如果定义了beforeEach,没有next,访问将空白。
if (to.path !== '/') {
return next('/')
}
next()
}
转载于:https://my.oschina.net/u/2464371/blog/2962064