在VUE中路由遇到Error: Avoided redundant navigation to current location:报错显示是路由重复,

在你引入router.js再加上一句话:

//路由重复 报错解决办法
const originalPush = VueRouter.prototype.push
	VueRouter.prototype.push = function push(location) {
	return originalPush.call(this, location).catch((err) => err)
}

相关文章:

  • 2021-10-05
  • 2021-12-12
  • 2021-10-25
  • 2021-06-15
  • 2021-12-23
  • 2021-12-05
  • 2021-10-26
  • 2021-06-26
猜你喜欢
  • 2022-12-23
  • 2023-04-04
  • 2021-11-23
  • 2021-09-17
  • 2022-12-23
  • 2021-11-01
  • 2021-11-02
相关资源
相似解决方案