import Vue from "vue"; import VueRouter from "vue-router"; Vue.use(VueRouter); const routes = [{ path: '/', component: resolve => require(['../views/Home.vue'], resolve), meta: { title: '首页' }, }, { path: '/testPanel', component: resolve => require(['../components/TestPanel.vue'], resolve), meta: { title: '平板' }, }, { path: '/codemirror', component: resolve => require(['../components/codemirror.vue'], resolve), meta: { title: '编辑器' }, } ]; const router = new VueRouter({ mode: 'hash', base: process.env.BASE_URL, routes }) export default router