router.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import { createRouter, createWebHistory } from 'vue-router';
  2. import { HomeIcon } from '@hugeicons/core-free-icons';
  3. import { TableIcon } from '@hugeicons/core-free-icons';
  4. import { ViewIcon } from '@hugeicons/core-free-icons';
  5. import { SecurityValidationIcon } from '@hugeicons/core-free-icons';
  6. import { CalendarIcon } from '@hugeicons/core-free-icons';
  7. const routes = [
  8. {
  9. name: 'Welcome',
  10. path: '/',
  11. component: () => import('./vue/views/Welcome.vue'),
  12. meta: {
  13. title: 'Welcome',
  14. icon: HomeIcon,
  15. }
  16. },
  17. {
  18. name: 'TableExample',
  19. path: '/table-example',
  20. title: 'Table Example',
  21. component: () => import('./vue/views/TableExample.vue'),
  22. meta: {
  23. title: 'Table Example',
  24. icon: TableIcon,
  25. }
  26. },
  27. {
  28. name: 'ViewItem',
  29. path: '/view-item/:id',
  30. component: () => import('./vue/views/ViewItem.vue'),
  31. props: true,
  32. meta: {
  33. title: 'View Item',
  34. icon: ViewIcon,
  35. }
  36. },
  37. {
  38. name: 'Admin',
  39. path: '/admin',
  40. component: () => import('./vue/views/Admin.vue'),
  41. meta: {
  42. title: 'Admin',
  43. icon: SecurityValidationIcon,
  44. }
  45. },
  46. {
  47. name: 'CalendarExample',
  48. path: '/calendar-example',
  49. component: () => import('./vue/views/CalendarExample.vue'),
  50. props: true,
  51. meta: {
  52. title: 'Calendar Example',
  53. icon: CalendarIcon,
  54. }
  55. }
  56. ];
  57. const router = createRouter({
  58. history: createWebHistory(),
  59. routes,
  60. });
  61. export default router