路由报错图:
image.png
解决方案:
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)
}