解决多次跳转同一路由时报错


const originalPush = Router.prototype.push // 获取原型对象上的push函数
Router.prototype.push = function push (location) { // 修改原型对象中的push方法
    return originalPush.call(this, location).catch(err => err)
}

Vue.use(Router);