报错显示路由重复,对功能没有影响。
解决方法:
router 文件下 index.js 中添加下面代码即可
import Router from 'vue-router';
// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
const originalPush = Router.prototype.push
Router.prototype.push = function push (location) {
return originalPush.call(this, location).catch(err => err)
}