bookRouter.ts 438 B

12345678910111213141516171819202122
  1. import { createWebHashHistory, createRouter } from 'vue-router'
  2. export const bookRoutes = [
  3. {
  4. path: '/',
  5. name: 'shelf',
  6. component: () => import('../views/BookShelf.vue'),
  7. },
  8. {
  9. path: '/chapter',
  10. name: 'chapter',
  11. component: () => import('../views/BookChapter.vue'),
  12. },
  13. ]
  14. const router = createRouter({
  15. // mode: "history",
  16. history: createWebHashHistory(),
  17. routes: bookRoutes,
  18. })
  19. export default router