index.js 837 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. const EquipList = () => import('@/pages/EquipList')
  7. const UserManger = () => import('@/components/UserManger')
  8. Vue.use(Router)
  9. export default new Router({
  10. routes: [{
  11. path: '',
  12. redirect: '/index/monitor1'
  13. },
  14. // {
  15. // path: '/login',
  16. // component: Login
  17. // },
  18. {
  19. path: '/index',
  20. component: Index,
  21. children: [
  22. {
  23. path: 'monitor1',
  24. component: Monitor,
  25. },
  26. {
  27. path: 'list1',
  28. component: EquipList,
  29. },
  30. {
  31. path: 'userManger1',
  32. component: UserManger
  33. },
  34. ]
  35. },
  36. ]
  37. })