路由跳转报错 Lyh_ 2023-01-11 74 阅读1分钟 今天新建项目时,有个报错。跳转正常,就是显示报错 解决方法: 在router/index.js 加上如下代码 const routerPush = VueRouter.prototype.push VueRouter.prototype.push = function push(location) { return routerPush.call(this, location).catch(error=> error) } 问题得到解决