vben.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import type { RouteRecordRaw } from 'vue-router';
  2. import {
  3. VBEN_DOC_URL,
  4. VBEN_ELE_PREVIEW_URL,
  5. VBEN_GITHUB_URL,
  6. VBEN_LOGO_URL,
  7. VBEN_NAIVE_PREVIEW_URL,
  8. } from '@vben/constants';
  9. import { BasicLayout, IFrameView } from '#/layouts';
  10. import { $t } from '#/locales';
  11. const routes: RouteRecordRaw[] = [
  12. {
  13. component: BasicLayout,
  14. meta: {
  15. badgeType: 'dot',
  16. icon: VBEN_LOGO_URL,
  17. order: 9999,
  18. title: $t('page.vben.title'),
  19. },
  20. name: 'VbenProject',
  21. path: '/vben-admin',
  22. children: [
  23. {
  24. name: 'VbenAbout',
  25. path: '/vben-admin/about',
  26. component: () => import('#/views/_core/about/index.vue'),
  27. meta: {
  28. icon: 'lucide:copyright',
  29. title: $t('page.vben.about'),
  30. },
  31. },
  32. {
  33. name: 'VbenDocument',
  34. path: '/vben-admin/document',
  35. component: IFrameView,
  36. meta: {
  37. icon: 'lucide:book-open-text',
  38. link: VBEN_DOC_URL,
  39. title: $t('page.vben.document'),
  40. },
  41. },
  42. {
  43. name: 'VbenGithub',
  44. path: '/vben-admin/github',
  45. component: IFrameView,
  46. meta: {
  47. icon: 'mdi:github',
  48. link: VBEN_GITHUB_URL,
  49. title: 'Github',
  50. },
  51. },
  52. {
  53. name: 'VbenNaive',
  54. path: '/vben-admin/naive',
  55. component: IFrameView,
  56. meta: {
  57. badgeType: 'dot',
  58. icon: 'logos:naiveui',
  59. link: VBEN_NAIVE_PREVIEW_URL,
  60. title: $t('page.vben.naive-ui'),
  61. },
  62. },
  63. {
  64. name: 'VbenElementPlus',
  65. path: '/vben-admin/ele',
  66. component: IFrameView,
  67. meta: {
  68. badgeType: 'dot',
  69. icon: 'logos:element',
  70. link: VBEN_ELE_PREVIEW_URL,
  71. title: $t('page.vben.element-plus'),
  72. },
  73. },
  74. ],
  75. },
  76. ];
  77. export default routes;