引入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)
}

  

原文地址:https://www.cnblogs.com/karila/p/13475571.html