在vue中使用ElementUI的按钮跳转遇到的问题

路由跳转正常,但是会报错

解决方法很简单 去路由的index.js添加
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

谢谢阅读