| | |
| | | import Vue from 'vue' |
| | | import VueRouter from 'vue-router' |
| | | import HomeView from '../views/HomeView.vue' |
| | | |
| | | Vue.use(VueRouter) |
| | | |
| | | const routes = [ |
| | | // { |
| | | // path: '/', |
| | | // component: Layout, |
| | | // redirect: '/home', |
| | | // children: [{ |
| | | // path: 'home', |
| | | // name: 'home', |
| | | // component: () => import('@/views/layout'), |
| | | // }] |
| | | // }, |
| | | { |
| | | path: '/', |
| | | name: 'home', |
| | | component: HomeView |
| | | path:'/home', |
| | | name:'home', |
| | | component:()=>import('@/views/layout'), |
| | | children:[ |
| | | { |
| | | path:"video", |
| | | name:'video', |
| | | component:()=>import('@/views/video') |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/about', |
| | | name: 'about', |
| | | // route level code-splitting |
| | | // this generates a separate chunk (about.[hash].js) for this route |
| | | // which is lazy-loaded when the route is visited. |
| | | component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue') |
| | | } |
| | | 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({ |