vue项目中点击重复路由报错问题的结局
在use路由的文件中添加
import Router from 'vue-router';
import Vue from 'vue';
Vue.use(Router)
//获取原型对象上的push函数
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
};