Uncaught (in promise) Error: Avoided redundant navigation to current location: “/index“. 解决方法
在router.js中加入以下代码就可以
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {return originalPush.call(this, location).catch(err => err)
}
如果你的改了push还是没有生效,修改路由replace方法,阻止重复点击报错
const originalReplace = VueRouter.prototype.replace;
VueRouter.prototype.replace = function replace(location) {return originalReplace.call(this, location).catch(err => err);
};
Uncaught (in promise) Error: Avoided redundant navigation to current location: “/index“. 解决方法相关推荐
- 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 ...
- 解决Vue报错:Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location
问题描述:重复点击导航时,控制台出现报错 ,虽然不影响功能使用,但也不能坐视不管. 解决 Vue 重复点击相同路由,出现 Uncaught (in promise) NavigationDuplica ...
- 解决报错:Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “
报错内容: vue-router.esm.js?68cf:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navi ...
- vue2里面的Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location
编程式导航跳转到当前路由(参数不变),多次执行就会在控制台出现如下结果: 怎么解决: (1)最有效--重写push.replace 在router-index.js中添加: // 重写push.rep ...
- Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “/deta
Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: " ...
- 解决Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location问题
在Vue路由中遇到Error: Avoided redundant navigation to current location:xxxx:错误,意思是路由重复 在router文件夹下的index.j ...
- Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “/sear
1). 问题: 编程式路由跳转到当前路径且参数没有变化时会抛出 NavigationDuplicated 错误 2). 原因分析: vue-router3.1.0之后, 引入了push()的promi ...
- Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “/zhu“
错误原因:避免重复导航到当前路径 <template><div><input type="text" placeholder="搜索&quo ...
- vue-router 报错Error: Avoided redundant navigation to current location: “/index/user“解决方式
问题 使用ivew Menu 制作的导航菜单,连续点击同一个导航时报错 该报错不影响功能 当前地址 http://localhost:8080/#/transfer/index 连续点击–信息录入 报 ...
最新文章
- stm32 GPIO的8种工作模式
- 总结基于ArcGIS Server 9.2 Dot Net ADF的WebGIS项目部署问题
- 【解决方案】OpenCV配置【Win10+VS2017】(本人于2018年3月30日完成)
- Springboot .properties或.yml配置文件读取pom.xml文件值
- BZOJ 1051 受欢迎的牛(Tarjan缩点)
- 【编译原理】语言的定义
- Deltix Round, Spring 2021 (open for everyone, rated, Div. 1 + Div. 2)
- 【ubuntu】ubuntu下用make编译程序报错找不到openssl/conf.h
- docker run 挂载卷_docker mysql配置挂载到卷
- CSS 盒倒影 box-reflect属性
- 【Struts1.2总结系列】struts-config.xml配置
- springboot15 集成Druid(德鲁伊)
- mysql连网安装和断网安装的区别_Linux 断网安装MySQL5.x操作步骤
- PS一键磨皮美白扩展插件Delicious Retouch 5.0 汉化集合版 Win/Mac
- 验证哥德巴赫猜想php,庞加莱猜想告破
- 计算机管理为什么不能扩展卷,Win10 C盘不能扩展卷怎么解决?
- python实现百度语音合成(超详细!!)
- 获奖公布|@程序员,你读过的书,藏着自己的命运
- 懒惰程序员的百宝箱:提升工作效率的七大神器
- 网易2016招聘笔试升级之路Java代码
热门文章
- 缺少ncurses包的解决办法
- 1 ELK安装部署并监控nginx
- ubuntu中make出错
- nginx启动报错 :Failed to start The nginx HTTP and reverse prox...er.
- 百度贴吧中的匿名回复,根本不是匿名,完全可以看到用户的全部IP。
- 解决文件夹无限嵌套无法删除的问题---最新办法
- 解决PRINT函数UTF-8问题
- Android中如何解决输入法键盘和activity页面遮挡的问题
- dubbo调用服务出现如下异常
- 如何重置/删除chrome的输入突出显示/焦点边框? [重复]