import Vue from 'vue' import Router from 'vue-router' Vue.use(Router) const Home = () => import(/* webpackChunkName: 'home' */ '@/components/Home.vue') const Main = () => import(/* webpackChunkName: 'home' */ '@/views/main') const Equipment = () => import(/* webpackChunkName: 'equipment' */ '@/views/equipment') const Rooms = () => import(/* webpackChunkName: 'rooms' */ '@/views/rooms') const Verit = () => import(/* webpackChunkName: 'verit' */ '@/views/verit') const Detail = () => import(/* webpackChunkName: 'detail' */ '@/views/detail') const Monitoring = () => import(/* webpackChunkName: 'monitoring' */ '@/views/monitoring') const Spread = () => import(/* webpackChunkName: 'spread' */ '@/views/spread') const Check = () => import(/* webpackChunkName: 'spread' */ '@/views/check') const Asset = () => import(/* webpackChunkName: 'spread' */ '@/views/asset') const System = () => import(/* webpackChunkName: 'system' */ '@/views/system') export default new Router({ mode: 'history', routes: [ { path: '/', component: Home, redirect: '/main', children: [ { path: 'main', component: Main }, { path: 'equipment', component: Equipment }, { path: 'rooms', component: Rooms }, { path: 'vr', component: Verit }, { path: 'detail', component: Detail }, { path: 'monitoring', component: Monitoring }, { path: 'spread', component: Spread }, { path: 'check', component: Check }, { path: 'asset', component: Asset }, { path: 'system', component: System } ] } ] })