在VUE中路由遇到Error: 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)
}