/** * router 配置,使用路由懒加载 */ import Vue from 'vue' import Router from 'vue-router' import Store from '../store' // import HelloWorld from '@/components/HelloWorld' Vue.use(Router) let router = new Router({ // mode: 'history', routes: [ { path: '/', name: 'root', // component: () => import('@/pages/index') // component: () => import('@/pages/login/index') component: () => import('@/pages/room/list') }, { path: '/login', name: 'login', component: () => import('@/pages/login/index') }, { path: '/index', name: 'index', component: () => import('@/pages/index') }, { path: '/room/list', name: 'roomList', component: () => import('@/pages/room/list') // meta: { title: '治疗室列表', keepAlive: true } }, { path: '/room/detail', name: 'roomDetail', component: () => import('@/pages/room/detail') // meta: { title: '治疗室详情', keepAlive: false } } ] }) export default router