Vue.use(VueRouter);
// 处理el-menu-item 路由重复跳转出错情况
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location: any) {
return (originalPush.call(this, location) as any).catch((err: any) => {
window.location.reload();
});
};
const router = new VueRouter({
base: "/",
mode: "history",
routes,
});