index.js 564 B

1234567891011121314151617181920212223242526272829
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. // const Login = () => import('@/components/Login')
  4. const Index = () => import('@/components/Index')
  5. const Monitor = () => import('@/pages/Monitor')
  6. Vue.use(Router)
  7. export default new Router({
  8. routes: [{
  9. path: '',
  10. redirect: '/index/monitor1'
  11. },
  12. // {
  13. // path: '/login',
  14. // component: Login
  15. // },
  16. {
  17. path: '/index',
  18. component: Index,
  19. children: [
  20. {
  21. path: 'monitor1',
  22. component: Monitor,
  23. },
  24. ]
  25. },
  26. ]
  27. })