重复点击菜单。路由重复被点击时报错

时间:2021-07-12 18:19:36   收藏:0   阅读:0

在router中加入

const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!