出错原因路由中添加了相同的路由 解决方法 在src/router/index.js中重写push方法 /*重写router.push方法*/ const routerPush = VueRouter.prototype.push VueRouter.prototype.push = function push(location) { return routerPush.call(this, location).catch(error=> error) }