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

在router中加入

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

 

posted @ 2021-07-12 10:14  我的世界蹦擦擦  Views(48)  Comments(0)    收藏  举报