导航不允许导航到当前位置https://stackoverflow.com/questions/57837758/navigationduplicated-navigating-to-current-location-search-is-not-allowed
最简单方法 :push后面加个异常捕获
更好的方法 :可以导航守卫中增加判断 如果是当前路由直接返回
2023-02-20编程教程下载本文current,Navigating,NavigationDuplicated
导航不允许导航到当前位置https://stackoverflow.com/questions/57837758/navigationduplicated-navigating-to-current-location-search-is-not-allowed
最简单方法 :push后面加个异常捕获
更好的方法 :可以导航守卫中增加判断 如果是当前路由直接返回
《NavigationDuplicated Navigating to current location (“/XXX”) is not allowed.doc》
下载本文的Word格式文档,以方便收藏与打印。
main.js 配置如下 import Router from 'vue-router'; //路由导航冗余报错(路由重复) const originalPush = Router.prototype.push Router.prototype.push = function push(location) { return originalPush...
2023-05-10编程教程NavigationDuplicated,promise,解决办法