在使用this.$router.push进行路由的跳转时,出现如下报错:
NavigationDuplicated: Avoided redundant navigation to current location

错误信息.png
解决办法:

参考位置-main页面.png
const changePush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return changePush.call(this, location).catch(err => err);
}