解决Vue-Router升级导致的Uncaught(in pro

2020-09-07  本文已影响0人  Enginner_XZ

请将下面代码复制粘贴到路由文件内

const originalPush = VueRouter.prototype.push
VueRouter.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)
}

具体上图

路由next重定向问题.png
上一篇 下一篇

猜你喜欢

热点阅读