引入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)
}
浙公网安备 33010602011771号