在vue项目中路由跳转过程中浏览器会报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)
}