vue报错
vue-router.esm.js?fe87:2062 Uncaught (in promise) Error: Avoided redundant navigation to current location: “/userPage”.
at createRouterError (vue-router.esm.js?fe87:2062)
at createNavigationDuplicatedError (vue-router.esm.js?fe87:2035)
at HashHistory.confirmTransition (vue-router.esm.js?fe87:2195)
at HashHistory.transitionTo (vue-router.esm.js?fe87:2125)
at HashHistory.push (vue-router.esm.js?fe87:2595)
at eval (vue-router.esm.js?fe87:2913)
at new Promise ()
at VueRouter.push (vue-router.esm.js?fe87:2912)
at VueComponent.created (indexPage.vue?8cc2:96)
at invokeWithErrorHandling (vue.esm.js?efeb:1863)

参考博客https://www.cnblogs.com/xinheng/p/13019818.html

可以在router的配置文件中(router -> index.js)加上下面这句话,注意位置:

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

原文链接:https://blog.csdn.net/xiecheng1995/article/details/106497172/

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

  1. 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 即可. ...

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

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

  3. 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 ...

  4. 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% ...

  5. Uncaught (in promise) Error: Avoided redundant navigation to current location: “/index“. 解决方法

    在router.js中加入以下代码就可以 const originalPush = Router.prototype.push Router.prototype.push = function pus ...

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

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

  7. 解决报错:Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “

    报错内容: vue-router.esm.js?68cf:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navi ...

  8. 【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 ...

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

    问题描述:重复点击导航时,控制台出现报错 ,虽然不影响功能使用,但也不能坐视不管. 解决 Vue 重复点击相同路由,出现 Uncaught (in promise) NavigationDuplica ...

最新文章

  1. iOS iOS-System-Services(系统信息)
  2. 修改mysql导入sql大小限制_修改phpMyAdmin导入SQL文件的大小限制
  3. 表格过滤器_不用记账软件也可以记录支出明细,这个在线协同表格很方便
  4. mysql不同版本会覆盖吗,[mysql不同版本数据库同步]mysql数据库主从同步,master和slave上的mysql必须版本一样吗,如果不一样会有什么结果?...
  5. 【小虫虫】邮购笔记本的注意事项
  6. MYSQL--一条SQL更新语句是如何执行的?
  7. mysql substr 中文字符_解析使用substr截取UTF-8中文字符串出现乱码的问题
  8. mysql脚本中如何写判断_mysql中如何写判断语句
  9. Windows核心编程_Edit控件无法输入问题
  10. 「Leetcode」206.反转链表:听说过两天反转链表又写不出来了?
  11. Codeforces Round #232 (Div. 1) 解题报告
  12. Tomcat日志设置
  13. 一文搞懂JVM内存结构
  14. HTML相对路径简析
  15. @kubernetes(k8s)使用adm安装实现keepalived高可用
  16. c语言 逻辑 与或非
  17. Spring Data JPA手动管理事务
  18. maxcomputer内建函数按字母排序
  19. 联邦学习 | 无处不在的隐私泄露!
  20. 前端必备网站(纯手工输入)

热门文章

  1. 最好用的屏幕截图抓屏工具(FastStone Capture) 绿色版下载,首选推荐!
  2. 图像搜索|实现拍立淘功能: 以图搜图
  3. java枚举类型多属性的应用
  4. elisa数据处理过程图解_elisa原理和分类附图解
  5. cdn.bootcss.com挂了。访问超时,怎么办?
  6. 进程号一直在变,怎么杀死程序?
  7. debian:disk加密
  8. 盘点4大下载神器,教你分分钟搞定文件下载
  9. Unity | Vuforia物体识别
  10. Python 异步:完整教程