Vue-router跳转路由重复报错

标题Vue-router跳转路由重复报错

解决方法:在路由配置中加入下面一段话就行了

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

你可能感兴趣的:(Vue-router跳转路由重复报错)