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); } Vue.use(Router) export default new Router({ // base: "/ldzh/ui", // mode: "history", routes: [ { path: "/", component: () => import("@/pages/index"), } ] })