vue-router.esm.js?3423:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “/search”.
at createRouterError (webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:1993:15)
at createNavigationDuplicatedError (webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:1978:15)
at HashHistory.confirmTransition (webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:2257:18)
at HashHistory.transitionTo (webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:2186:8)
at HashHistory.push (webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:2614:10)
at eval (webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:2922:22)
at new Promise ()
at VueRouter.push (webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:2921:12)
at VueComponent.goSearch (webpack-internal:///./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Header/index.vue?vue&type=script&lang=js&:7:20)
at invokeWithErrorHandling (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:3470:26)


在点击同一个跳转路由的时候,点一下并没有报错,但是多点几下就会报错,看了网上的解决办法

  • 在router/index.js加以下代码
const originalPush = VueRouter.prototype.pushVueRouter.prototype.push = function push(location) {return originalPush.call(this, location).catch(err => err)
}


但是不知道为什么,求各位大佬解答!

报错 | vue-router.esm.js?3423:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navig相关推荐

  1. vue-router.esm.js?3423:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navig错误解析

    出现的情况 写vue时,当使用编程式导航多次点击跳转时会出现 原因 因为编程式this.$router.push或者this.$router.replace的返回值是一个Promise对象,所以需要处 ...

  2. Vue-Router点击相同路由报错,vue-router.esm.js?8c4f:2065 Uncaught (in promise) NavigationDuplicated: Avoided r

    vue-router.esm.js?8c4f:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation ...

  3. vue-router.esm.js?8c4f:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation

    问题 在做前后端分离项目的时候,vue使用路由进行界面跳转时,出现了以下错误,说是路由重复啥的,之前的项目都没这问题.. vue-router.esm.js?8c4f:2065 Uncaught (i ...

  4. 【vue-router.esm.js?8c4f:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigati】

    vue-router.esm.js?8c4f:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation ...

  5. vue-router.esm.js?a12b:2046 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation

    报错信息 vue-router.esm.js?a12b:2046 Uncaught (in promise) NavigationDuplicated: Avoided redundant navig ...

  6. vue-router.esm.js?8c4f:1958 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation

    原链接: https://blog.csdn.net/qq_44242030/article/details/108823697?ops_request_misc=%257B%2522request% ...

  7. vue-router.esm.js?fe87:2062 Uncaught (in promise) Error: Avoided redundant navigation to current loc

    vue报错 vue-router.esm.js?fe87:2062 Uncaught (in promise) Error: Avoided redundant navigation to curre ...

  8. vue报错vue-router.esm.js?8c4f:2062 Uncaught (in promise) Error: Avoided redundant navigation to curren

    在写导航切换时点击会有以下报错 这个报错是是路由中点击路径重复 ,也有可能是安装的vue-router还是之前出错的那个版本,在项目目录下运行 npm i vue-router@3.0 -S 即可. ...

  9. vue-router报错的解决方法vue-router.esm.js?8c4f:2065 Uncaught (in promise) NavigationDuplicated:

    在main.js中加入以下代码 const originalPush = Router.prototype.push Router.prototype.push = function push(loc ...

最新文章

  1. MySQL数据表命令
  2. SpringCloud服务注册启动的时候报错(com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException)
  3. mysql plugin 调用_MySQL插件接口的调用方式
  4. 体感Kinect手势识别开发基本原理
  5. Vue实现仿音乐播放器11-实现访问百度音乐API实现播放音乐功能
  6. Mac os x下配置nginx + php
  7. redis 内存不足 排查_一文深入了解 Redis 内存模型,Redis 的快是有原因的!
  8. iOS8 用AVAudioPlayer播放音乐(Swift)
  9. SAP UI5 应用开发教程之十五 - 对话框和 Fragments 的使用方式
  10. Jquery提交表单 Form.js官方插件介绍
  11. 教你用Java7的Fork/Join框架开发高并发程序
  12. 网络协议:TCP滑动窗口
  13. 加密 数字_数字卢布不会具有BTC这样的加密资产的优势
  14. JAVA 实现《拳皇误闯冒险岛》游戏
  15. Visio 2016去掉页边距(图形四周的空白区域)的解决办法 (适用于适应绘图)
  16. git进阶 | 01 - git基础操作进阶
  17. 华硕笔记本装固态,清灰,装win10教程
  18. 纪念杰克韦尔奇:职业经理人怎么做变革
  19. 黑马程序员--Objective-C之--@property和@synthesize关键字
  20. lua(1):lua,luarocks介绍及lua库安装

热门文章

  1. 洛谷_2495 [SDOI2011]消耗战(虚树)
  2. 正在读《密码王朝》,却忍不住先说两句
  3. 用rpm安装卸载软件
  4. 3DSMAX中英文对比大全(从A-Z分类)
  5. 固定td宽度令其不随内容改变以及固定tr的高度
  6. 宽带电视显示无法解析服务器域名怎么办,域名解析到服务器后无法访问怎么解决?...
  7. rsi指标如何计算怎样分析RSI指标
  8. Notion 出现白屏的处理
  9. 为什么我注入mapper为null啊?
  10. 第五季完美童模 形象大使林子懿现场走秀回顾