import Vue from 'vue' import VueRouter from 'vue-router' Vue.use(VueRouter) const routes = [ // { // path: '/', // component: Layout, // redirect: '/home', // children: [{ // path: 'home', // name: 'home', // component: () => import('@/views/layout'), // }] // }, { path:'/home', name:'home', component:()=>import('@/views/layout'), children:[ { path:"video", name:'video', component:()=>import('@/views/video') } ] }, { path:'/login', name:'login', component:()=>import('@/views/login') }, { path: '/screen', name: 'screen', component: ()=>import('@/views/screen') }, { path: '/404', name:"404", component: () => import('@/views/NotFound'), }, { path: '*', redirect: '/404' } ] const router = new VueRouter({ mode: 'history', base: process.env.BASE_URL, routes }) export default router