解决vue在控制台的 NavigationDuplicated 报错

解决问题: 点击相同的链接,会有一个重复key的报错

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

放在router 的 index.js 里

猜你喜欢

转载自www.cnblogs.com/pengchenggang/p/11572652.html
今日推荐