含义

不要重复导航到当前位置。

解决办法

在 router.js 或者 /router/index.js 路由文件中,添加如下代码:

const originalPush = VueRouter.prototype.push

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

如下图:

Vue 路由跳转报错:NavigationDuplicated: Avoided redundant navigation to current location

每天学习一点点,每天进步。

相关文章:

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