点击跳转同一路由报错

在router文件夹下的index.js添加一段代码:

const originalPush = Router.prototype.push;
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
posted @ 2021-12-22 14:18  koo-  阅读(41)  评论(0)    收藏  举报