重复点击导航报错:Avoided redundant navigation to current location
问题:单击路由后跳转成功,再次点击报错
解决:在main.js里添加
import VueRouter from 'vue-router'
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
};