const originalPush = Router.prototype.push
Router.prototype.push = function push (location) {
return originalPush.call(this, location).catch(err => err)
}
这就把代码贴在就可以了
标签:err,报错,originalPush,跳转,push,Router,prototype,location
来源: https://www.cnblogs.com/Qinhr/p/16524590.html