Vue问题解决方法合集 发表于 2020-06-16 通过此文章来记录Vue实战项目中一些常见问题的解决方法。 vue-router 导航当前路由报错1message: "Navigating to current location (XXX) is not allowed" 我们可以通过重写路由的push方法来解决此问题。 123456//import Router from "vue-router"const routerPush = Router.prototype.pushRouter.prototype.push = function push(location) { return routerPush.call(this, location).catch(error=> error)}