解决路由报错Uncaught (in promise) NavigationDuplicated:
Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/cart报错
解决办法:在router下index.js中加入下面代码
1.replace
const originalReplace = VueRouter.prototype.replace;
VueRouter.prototype.replace = function replace(location) {return originalReplace.call(this, location).catch(err => err);
};
2.push
const VueRouterPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push (to) {return VueRouterPush.call(this, to).catch(err => err);
}
解决路由报错Uncaught (in promise) NavigationDuplicated:相关推荐
- vue报错 Uncaught (in promise) NavigationDuplicated {_name:““NavigationDuplicated“... 的解决方法
vue报错 Uncaught (in promise) NavigationDuplicated {_name:""NavigationDuplicated"... 的解 ...
- vue报错Uncaught (in promise) NavigationDuplicated:Avoided redundant navigation
vue-router.esm.js?3423:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation ...
- Vue. 之 报错 Uncaught (in promise)
Vue. 之 报错 Uncaught (in promise) 在点击同一个URL的时候,会报错如下: 解决方案: 在项目目录下运行 npm i vue-router@3.0 -S 即可. 转载于:h ...
- Vue-Router 路由重复点击时报错 Uncaught (in promise) NavigationDuplicated:Avoided redundant navigation to curr
前言 总结一下,在项目中遇到的一个小问题,使用 Vue 构件的项目里,有时候会存在 重复点击路由 报错的问题,Uncaught (in promise) NavigationDuplicated:Av ...
- 解决 Vue 重复点击相同路由,出现 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation 问题
问题描述:重复点击导航时,控制台出现报错 ,虽然不影响功能使用,但也不能视而不见. 解决方案: 方案一:只需在 router 文件夹下,添加如下代码: // src/router/index.js V ...
- 解决上传图片时报错Uncaught (in promise) DOMException: Failed to execute ‘put‘ on ‘IDBObjectStore‘
最近项目中遇到一个小问题,系统在前端页面上传图片时,后台报400错误:Uncaught (in promise) DOMException: Failed to execute 'put' on 'I ...
- 【Vue-Bug记录】Vue 删除取消报错Uncaught (in promise) cancel
删除某条数据 弹出删除提示框 点击取消 浏览器控制台报错 报错原因: this.$confirm方法内置promise方法, 所以不能把.catch()去掉(因为取消操作时,无法捕获) 解决方法: 在 ...
- vue3 路由报错 Uncaught Error: Catch all routes (“*“) must now be defined using a param with a custom reg
错误: const notFound = () => import('@views/404/404.vue'){path: '*',name: '404',component: notFound ...
- domtoimage截屏报错Uncaught(in promise)
1. 截屏失败,找了很久的原因,我出现的问题是因为截屏的内容中有一个img标签,src为空,所以就报如下错误,我移除img标签,就可以正常截屏了.
最新文章
- 这本 Kubernetes 图书,你一定不要错过!
- 【腾讯代码文化】人均3.6万行代码,《腾讯研发大数据报告》正式发布!
- Hadoop生态圈-Hive的自定义函数之UDF(User-Defined-Function)
- 2440 nand flash和nor flash上启动
- SAP UI5 应用开发教程之六十二 - 基于 OData V4 的 SAP UI5 表格控件使用方法介绍
- 使用DDD、事件风暴和Actor来设计反应式系统
- EA问题的JDK14实例
- 用于基于SWT的应用程序的RichText编辑器组件
- 前端学习(4):chome浏览器
- django html显示xml,如何将HTML与Django集成?
- 【数论】【Polya定理】poj1286 Necklace of Beads
- 语音识别asr是什么
- MongoDB简单使用 —— 安装
- wxWidgets+wxSmith版电子词典
- windows10中最强大王爽汇编语言学习环境
- 数据库查询数据去除重复
- MySQL技术内幕InnoDB存储引擎
- Residual, BottleNeck, Inverted Residual, MBConv的解释和Pytorch实现
- DZY Loves Math题解
- 国标GB28181视频流媒体平台4G摄像头无插件直播平台EasyGBS出现实时视频点播错误问题解析