解决vue项目路由出现message: Navigating to current location (XXX) is not allowed的问题
今天在写一个后台界面的时候,出现了这个报错,Navigating to current location ("/userslist") is not allowed问题。
” 不允许导航到当前位置(“/userslist”)“
在网上查了下,发现问题,大致如下:
原因:当前访问的路由是相同的。
解决办法:需要重写路由的push方法
在【router/index.js路由页面】
import VueRouter from "vue-router";
// 重写路由的push方法const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {return routerPush.call(this, location).catch(error=> error)
}
解决vue项目路由出现message: Navigating to current location (XXX) is not allowed的问题相关推荐
- 解决vue项目路由出现message: “Navigating to current location (XXX) is not allowed“的问题
解决vue项目路由出现message: "Navigating to current location (XXX) is not allowed"的问题 参考文章: (1)解决vu ...
- 解决vue项目路由出现message: “Navigating to current location (XXX) is not allowed“的问题(点击多次跳转)
解决vue项目路由出现message: "Navigating to current location (XXX) is not allowed"的问题(点击多次跳转) 参考文章: ...
- Vue 项目路由出现 message: “Navigating to current location (XXX) is not allowed“的问题
message: "Navigating to current location (XXX) is not allowed" 原因: 在路由中添加了相同的路由 解决: 重写路由的p ...
- vue路由报错Navigating to current location (“/login“) is not allowed踩坑总结
.在我添加"未登录"判断后,想自动跳转到登录页.但是遇到了问题: Navigating to current location ("/login") is no ...
- VUE-Router之解决 Navigating to current location (XXX) is not allowed
VUE-Router之解决 Navigating to current location ("/index/list2") is not allowed 错误代码: Navigat ...
- 代码跳转路由报错_vue路由报错Navigating to current location (/login) is not allowed踩坑总结...
.在我添加"未登录"判断后,想自动跳转到登录页.但是遇到了问题: Navigating to current location ("/login") is no ...
- 解决vue项目出现Navigating to current location (XXX) is not allowed 报错
出现原因:在当前路由,重复点击了当前路由 "Navigating to current location ("/某路由") is not allowed" 解决 ...
- vue项目路由 Navigating to current location (/xxxx) is not allowed
在使用vue构建项目的时候为了控制页面刷新后路由和界面保持在原来的位置 加了 reloadRouter(path) {this.$router.replace({path: path,query: { ...
- 解决 Navigating to current location (/userslist) is not allowed问题。
今天在写一个后台界面的时候,出现了这个报错,Navigating to current location ("/userslist") is not allowed问题. &quo ...
最新文章
- 浅谈人工智能应对数字化转型挑战的5个领域
- java gui 颜色从html_Java GUI显示网页并返回HTML
- php mysql日期戳转时间戳_php日期转时间戳,指定日期转换成时间戳
- python库——h5py入门讲解
- .net使用SqlBulkCopy类操作DataTable批量插入数据库数据,然后分页查询坑
- NetworkX系列教程(1)-创建graph
- Visual Studio 2022这些重大更新,影响每一位.NET开发者!
- python链表和树实验报告_数据结构树和森林实验报告
- ROS入门-1认识Linux系统,虚拟机安装Ubuntu
- php7 匿名继承类_PHP7中的匿名类使用方法
- 记录一次线上mysql事务隔离级别引发的思考
- 【知识图谱】Neo4j 删除、清空数据库的方法
- 苏宁11.11:苏宁双十一大促保障经验
- 最新使用Python进行开发网站教程项目实战(完整)
- 编程:Python实现图片识别
- ACM MM ECCV 2022 | 美团视觉8篇论文揭秘内容领域的智能科技
- Pyhton爬小说实例解析笔记——爬虫基础
- Fine Dining G
- VSCode 前端插件推荐
- 简单理解与实验生成对抗网络GAN