index.ts 1007 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import {createRouter, createWebHistory} from 'vue-router'
  2. import layout from '@/layout/index.vue'
  3. const router = createRouter({
  4. history: createWebHistory(import.meta.env.BASE_URL),
  5. routes: [
  6. {
  7. path: '/',
  8. redirect: '/index',
  9. component: layout,
  10. children: [
  11. {
  12. path: 'index',
  13. name: 'home',
  14. component: () => import('@/views/Home.vue'),
  15. },
  16. {
  17. path: 'station/:stcd',
  18. name: 'station',
  19. component: () => import('@/views/Station.vue'),
  20. },{
  21. path: 'situational/:stcd',
  22. name: 'situational',
  23. component: () => import('@/views/Situational.vue'),
  24. },{
  25. path: 'intelloper/:stcd',
  26. name: 'intelloper',
  27. component: () => import('@/views/IntellOper.vue'),
  28. },{
  29. path: 'detail/:stcd',
  30. name: 'detail',
  31. component: () => import('@/views/Detail.vue'),
  32. },
  33. ],
  34. },
  35. ],
  36. })
  37. export default router