重写路由push的方法
// 如果报错可能是vue-router版本问题
const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(error => error)
}
vue-router的版本低了不适配 改成3.1.6版本(或更高都可)
重写路由push的方法
// 如果报错可能是vue-router版本问题
const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(error => error)
}
vue-router的版本低了不适配 改成3.1.6版本(或更高都可)