网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  Vue报错:Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location

Vue报错:Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location

分类: IT文章 • 2022-04-01 21:16:25

Vue报错:Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location

错误原因,我猜测多半是版本问题

Vue报错:Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location

在router/index.js中添加如下代码

const originalPush = VueRouter.prototype.push

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

如下所示:
Vue报错:Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location

至此问题解决

相关推荐

  • Vue 路由跳转报错 Error: Avoided redundant navigation to current location: "/XXX".
  • 解决VueRoter/element-ui路由报错Error: Avoided redundant navigation to current location的问题
  • vue-router 报错、:Avoided redundant navigation to current location 错误、路由重复
  • Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/overview/serve" 报错的截图 原因:解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题 解决办法:
  • vue-router 报错、:Avoided redundant navigation to current location 错误、路由重复
  • Vue报错:Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location
  • NodeJS:安装CNPM
  • TypeScript: 類型 'HTMLElement | null' 不可指派給類型 'HTMLElement'。 類型 'null' 不可指派給類型 'HTMLElement'
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号