解决方法(全局设置)
// /router/index.js中设置 const originReplace = Router.prototype.replace const originalPush = Router.prototype.push Router.prototype.replace = function replace (location) { return originReplace.call(this, location).catch(err => err) } Router.prototype.push = function push (location) { return originalPush.call(this, location).catch(err => err) }