// 获取原型对象push函数
const originalPush = VueRouter.prototype.push
// 修改原型对象中的push函数
VueRouter.prototype.push = function push(location){
return originalPush.call(this , location).catch(err=>err)
}
// 获取原型对象replace函数
const originalReplace = VueRouter.prototype.replace
// 修改原型对象中的replace函数
VueRouter.prototype.replace = function replace(location){
return originalReplace.call(this , location).catch(err=>err)
}
针对vue项目菜单重复点击、路由报错问题
猜你喜欢
转载自blog.csdn.net/qq_34907249/article/details/130573055
今日推荐
周排行