vue路由重复问题

报错:
Avoided redundant navigation to current location:

Snipaste_2020-10-08_11-03-05.png

Vue.use(VueRouter);后面加

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

你可能感兴趣的:(vue路由重复问题)