原因:路由跳转 多次push同一个路由是不允许的
解决办法:1.vue-cli3版本 2.在设置router的js文件中重写push方法
Vue.use(VueRouter)
const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (to) {
return VueRouterPush.call(this, to).catch(err => err)
}
原因:路由跳转 多次push同一个路由是不允许的
解决办法:1.vue-cli3版本 2.在设置router的js文件中重写push方法
Vue.use(VueRouter)
const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (to) {
return VueRouterPush.call(this, to).catch(err => err)
}