Open ReturnVwp opened 4 years ago
这个是vue-router报的错,在升级了Vue-Router版本到到3.1.0及以上之后,页面在跳转路由时控制台会报Uncaught (in promise)的问题
具体什么原因导致,看一下Vue-Router的版本日志就知道了 不想报错的话
import Router from 'vue-router'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
return originalPush.call(this, location).catch(err => err)
}
Uncaught (in promise) Error: Redirected from "/login?redirect=%2Fsystem%2Fuser" to "/index" via a navigation guard. at createRouterError (vue-router.esm.js?8c4f:2060) at createNavigationRedirectedError (vue-router.esm.js?8c4f:2024) at eval (vue-router.esm.js?8c4f:2226) at eval (permission.js?223d:43)