element-ui.common.js:3379 Error: Navigation cancelled from "/" to "/menu" with a new navigation.
时间: 2024-04-24 13:27:01 浏览: 199
vue2+vuex3+vue-router3
这个错误是由于在路由导航中发生了重复的跳转导致的。根据引用\[1\]和引用\[2\]的内容,可以看出这个错误是由于在路由跳转时发生了重复的导航。为了解决这个问题,可以在Vue Router的配置文件中添加一段代码,如引用\[3\]所示。这段代码的作用是重写Vue Router的push方法,使其在发生重复导航时不会抛出错误。通过这样的修改,可以避免重复导航引发的错误。
#### 引用[.reference_title]
- *1* [解决路由版本问题(element...6514:3349 Error: Navigation cancelled from “/welcome“ to “/roles“ wit)](https://blog.csdn.net/meimeib/article/details/118938000)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [解决ElementUI导航栏重复点菜单报错问题](https://blog.csdn.net/xiecheng1995/article/details/106497172)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文