這個報錯不會影響頁面效果
在 router的index.js里面添加
import Vue from 'vue';
import Router from 'vue-router';
//路由導航冗余報錯(路由重復)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}