VUE报错Avoided redundant navigation to current location

报错内容:重复路由

解决方案:

// router/index.js
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
posted @ 2020-12-14 17:07  涛啊声依旧  阅读(93)  评论(0编辑  收藏  举报