先上一下报错的截图:
介绍一下解决方式:
在router目录下的index.js文件中加入如下代码:
const originalPush = Router.prototype.push Router.prototype.push = function push(location) { return originalPush.call(this, location).catch(err => err) }
这样就解决了。。。。
原文:https://www.cnblogs.com/belongs-to-qinghua/p/12549602.html