因而查了一下发现能够这样解决javascript
router文件夹下面的index.js中加上下面几句代码java
const originalPush = Router.prototype.push Router.prototype.push = function push(location) { return originalPush.call(this, location).catch(err => err) }