vue重复访问同一路由报错 import Vue from 'vue' import Router from 'vue-router' Vue.use(Router) // 重写router的push方法,防止访问同一路由报错 const VueRouterPush = Router.prototype.push Router.prototype.push = function push (to) { return VueRouterPush.call(this, to).catch(err => err) }