项目中点击菜单会发现重复点击一个路由会报一下错误:
解决这个错误的方法可以在路由里面写上一段代码,就能解决了
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch((err) => err)
}```
项目中点击菜单会发现重复点击一个路由会报一下错误:
解决这个错误的方法可以在路由里面写上一段代码,就能解决了
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch((err) => err)
}```