解决vue项目出现Navigating to current location (XXX) is not allowed 报错
出现原因:在当前路由,重复点击了当前路由"Navigating to current location ("/某路由") is not allowed"解决方案:在 router/index.js文件里添加下列方法即可/** * 重写路由的push方法 */const routerPush = Router.prototype.pushRouter.prototype.push = function push(location) { return routerPush.call(thi