路由报错图:

解决方案:
import VueRouter from 'vue-router'
// 处理狂点报错
const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(to) {
// @ts-ignore
return VueRouterPush.call(this, to).catch(err => err)
}
路由报错图:
解决方案:
import VueRouter from 'vue-router'
// 处理狂点报错
const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(to) {
// @ts-ignore
return VueRouterPush.call(this, to).catch(err => err)
}
本文标题:vue-router路由,狂点路由,重复路由会报错
本文链接:https://www.haomeiwen.com/subject/yizhtrtx.html
网友评论