引入elementUI或者vant,vuerouter报错Avoided redundant navigation to current location: "/"

在路由文件下写以下代码就可以解决

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

  

posted @ 2020-08-11 14:50  karila  阅读(169)  评论(0编辑  收藏  举报