You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
833 B

1 month ago
  1. import { createRouter, createWebHistory } from 'vue-router'
  2. const routes = [
  3. {
  4. path: '/',
  5. redirect: 'homePage'
  6. },
  7. {
  8. path: '/homePage',
  9. name: 'homePage',
  10. component: () => import('../views/homePage.vue'),
  11. // children: [
  12. // {name: 'AiEmotion', path: '/AiEmotion', component: () => import('@/views/AiEmotion.vue')}
  13. // ]
  14. },
  15. {
  16. path: '/choujiang',
  17. name: 'choujiang',
  18. component: () => import('../views/choujiang/index.vue'),
  19. },
  20. {
  21. path: '/zhongchou',
  22. name: 'zhongchou',
  23. component: () => import('../views/zhongchou/index.vue'),
  24. }
  25. ]
  26. // 创建路由实例
  27. const router = createRouter({
  28. history: createWebHistory(import.meta.env.VITE_PUBLIC_PATH),
  29. routes
  30. })
  31. // 导出
  32. export default router