index.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { createRouter, createWebHashHistory } from "vue-router";
  2. const router = createRouter({
  3. history: createWebHashHistory(import.meta.env.BASE_URL),
  4. routes: [
  5. {
  6. path: "/",
  7. name: "home",
  8. component: () => import("../views/Home/index.vue"),
  9. },
  10. {
  11. path: "/index",
  12. name: "index",
  13. component: () => import("../views/Index/index.vue"),
  14. },
  15. {
  16. path: "/chapter1",
  17. name: "chapter1",
  18. component: () => import("../views/Chapter1/index.vue"),
  19. },
  20. {
  21. path: "/chapter2",
  22. name: "chapter2",
  23. component: () => import("../views/Chapter2/index.vue"),
  24. },
  25. {
  26. path: "/chapter3",
  27. name: "chapter3",
  28. component: () => import("../views/Chapter3/index.vue"),
  29. },
  30. {
  31. path: "/chapter4",
  32. name: "chapter4",
  33. component: () => import("../views/Chapter4/index.vue"),
  34. },
  35. {
  36. path: "/chapter4",
  37. name: "chapter4",
  38. component: () => import("../views/Chapter4/index.vue"),
  39. },
  40. {
  41. path: "/detail/:chapter/:index",
  42. name: "detail",
  43. component: () => import("../views/Detail/index.vue"),
  44. },
  45. ],
  46. });
  47. export default router;