转自 https://blog.csdn.net/l508742729/article/details/102526293
放到main.js
里面
import Router from 'vue-router'
// 解决重复点击导航路由报错
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err);
}