使用的是 vue 3.0 在导航部分重复点击报错

报错信息如图

VUE router 导航重复点击报错的问题解决方案

Avoided redundant navigation to current location:  避免了对当前位置的冗余导航
 

其实无伤大雅,不影响操作的。

 

百度了解决方案,在 route.js 中添加以下代码

Vue.use(VueRouter)

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

 

然后就????了

 

相关文章:

  • 2022-12-23
  • 2021-08-21
  • 2021-09-17
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
猜你喜欢
  • 2021-11-23
  • 2021-11-02
  • 2022-12-23
  • 2023-04-04
  • 2021-11-01
  • 2021-09-01
相关资源
相似解决方案