vue-router 重复跳转页面 夏目里绘 2022-06-09 139 阅读1分钟 Vue.use(VueRouter) // 把下面的代码粘贴到路由模块中对应的位置,即可防止路由报错的问题 const originalPush = VueRouter.prototype.push VueRouter.prototype.push = function push(location) { return originalPush.call(this, location).catch(err => err) }