vue项目报"Navigating to current location ("/user") is not allowed"

问题重现:在vue项目中出现点击同一个路由地址报如下的错误

问题原因:当前访问的路由是相同的

解决方案: 在router的index.js里面重写router的push方法


刷新项目,完美解决。

你可能感兴趣的:(vue项目报"Navigating to current location ("/user") is not allowed")