用于解决$router.push跳转到一个相同的路由报错

  const originalPush = Router.prototype.push
  Router.prototype.push = function push (location) {
    return originalPush.call(this, location).catch(err => err)
  }

这就把代码贴在就可以了

posted @ 2022-07-27 13:51  QinHaoRan  阅读(233)  评论(0)    收藏  举报