Navigating to current location ("/") is not allowed
main.js
import Router from 'vue-router' // 这个是为了避免一个报错
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
Navigating to current location ("/") is not allowed的更多相关文章
- 解决vue项目路由出现message: "Navigating to current location (XXX) is not allowed"的问题(点击多次跳转)
如果网页跳转用的方法传参去跳转: (点击多次链接会出现错误) <a class="" href="javascript:void(0);" @click= ...
- vue-routerV3.1版本报错:message: "Navigating to current location ("/home") is not allowed",
出现这个错误的原因是,在路由跳转的时候两次push的path地址相同 解决方法两种: 1.切换版本回3.0版本 2.在你引了vue-router的js文件里加上如下代码即可 import VueRou ...
- vue路由中 Navigating to current location ("/router") is not allowed
报错原因:多次点击同一路由,导致路由被多次添加 解决方法: router/index中添加以下代码: //router/index.js Vue.use(VueRouter) //导入vue路由 co ...
- C#调试含有源代码的动态链接库遇见there is no source code available for the current location提示时的解决方案
C#调试含有源代码的动态链接库遇见there is no source code available for the current location提示时的解决方案: 1.首先试最常规的方法:Cle ...
- Vue Avoided redundant navigation to current location Error
这个报错的根源就是vue-router组件,错误内容翻译一下是: Avoided redundant navigation to current location === 避免冗余导航到当前位置 这个 ...
- 关闭ios弹出框:“would like to use your current location”
图一: 图二: 使用cordova生成ios项目,首次打开获取用户定位时会弹出两次对话框,关闭图二中对话框方法: document.addEventListener("deviceready ...
- vue-router 报错、:Avoided redundant navigation to current location 错误、路由重复
在用vue-router 做单页应用的时候重复点击一个跳转的路由会出现报错 这个报错是重复路由引起的只需在注册路由组建后使用下方重写路由就可以 const originalReplace = VueR ...
- Avoided redundant navigation to current location: "/users"
问题产生的原因:在Vue导航菜单中,重复点击一个菜单,即重复触发一个相同的路由,会报错,但不影响功能 解决:在router的配置文件中加入如下代码: const originalPush = Rout ...
- Vue 路由跳转报错 Error: Avoided redundant navigation to current location: "/XXX".
在router文件夹下的index.js中加入红色字体代码即可解决 import Vue from 'vue' import VueRouter from 'vue-router' Vue.use(V ...
随机推荐
- Linux - CentOS7 命令行快捷键简介
1. 概述 CentOS7 下输入命令的一些快捷键 2. 快捷键 1. 移动 单个字符 ctrl + b/f 单个单词 alt + b/f 行首行尾 ctrl + a/e 2. 编辑 删除单个字符 c ...
- Mac系统中桌面图片和用户头像图片的路径
系统中的桌面图片: /Library/Desktop Pictures/ 用户头像图片: 根目录资源库/user pictures/ 参考: [https://bbs.feng.com/read-ht ...
- 微信小程序中promise的使用
简介 相信看到这篇文章的同学,都已经对微信小程序的api文档有所了解了,也都经历了微信小程序api回调函数嵌套的痛苦,才会想要通过Promise解决回调地狱这个问题,我下面就直接介绍怎么在小程序中使用 ...
- Android学习02
今天学了ScrollView&HorizontalScrollView和WebView 一.ScrollView(垂直滚动),HorizontalScrollView(水平滚动) Scroll ...
- CapsNet资源
算法源码: https://github.com/xanderchf/pyCapsNet https://github.com/naturomics/CapsNet-Tensorflow 参考文章: ...
- UA池 代理IP池 scrapy的下载中间件
# 一些概念 - 在scrapy中如何给所有的请求对象尽可能多的设置不一样的请求载体身份标识 - UA池,process_request(request) - 在scrapy中如何给发生异常的请求设置 ...
- 【译】高级T-SQL进阶系列 (三)【中篇】:理解公共表表达式(CTEs)
[译注:此文为翻译,由于本人水平所限,疏漏在所难免,欢迎探讨指正] 原文链接:传送门. 一个简单的CTE例子 如前所述,CTE‘s提供给你了一个方法来更容易的书写复杂的代码以提高其可读性.假设你有列表 ...
- 简单oracle查询语句转换为mongo查询语句
可以将简单的单表查询语句转换成Mongo过滤条件 列: 1. db.demo.aggregate([ {"$match": {"$and": [{"p ...
- Java后台技术(Dubbo入门)
我现在公司提供的产品是即时通讯软件,因为我从.net桌面应用开发转岗,从java后台转项目经理,让我有幸拥有了后台开发人员所有的权限,所有的后台源码和技术文档对我开放,可惜仅在后台待了3周不到,还没来 ...
- Spring Boot 使用 CXF 调用 WebService 服务
上一张我们讲到 Spring Boot 开发 WebService 服务,本章研究基于 CXF 调用 WebService.另外本来想写一篇 xfire 作为 client 端来调用 webservi ...