解决:

router 文件下 index.js 中添加下面代码即可

// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
const originalPush = Router.prototype.push
Router.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}

vue-router.esm.js?2215:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/login"

 

vue-router.esm.js?2215:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/login"

 

 

 以上是点击退出及登录以后出现的错误。

 

参考:https://blog.csdn.net/weixin_44704285/article/details/107687115

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
  • 2022-02-05
  • 2021-09-16
  • 2021-12-18
  • 2022-12-23
相关资源
相似解决方案