vben.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import type { RouteRecordRaw } from 'vue-router';
  2. import { BasicLayout, IFrameView } from '@/layouts';
  3. import { VBEN_GITHUB_URL } from '@vben/constants';
  4. import { $t } from '@vben/locales/helper';
  5. import { preference } from '@vben/preference';
  6. export const vbenRoutes: RouteRecordRaw[] = [
  7. {
  8. component: BasicLayout,
  9. meta: {
  10. icon: preference.logo,
  11. title: 'Vben Admin',
  12. },
  13. name: 'AboutLayout',
  14. path: '/vben-admin',
  15. redirect: '/vben-admin/about',
  16. children: [
  17. {
  18. name: 'About',
  19. path: 'about',
  20. component: () => import('@/views/about/index.vue'),
  21. meta: {
  22. icon: 'mdi:creative-commons',
  23. title: $t('page.about'),
  24. },
  25. },
  26. {
  27. name: 'AboutDocument',
  28. path: 'document',
  29. component: IFrameView,
  30. meta: {
  31. icon: 'mdi:flame-circle',
  32. iframeSrc: 'https://doc.vvbin.cn/',
  33. keepAlive: true,
  34. title: $t('page.document'),
  35. },
  36. },
  37. {
  38. name: 'Github',
  39. path: 'github',
  40. component: IFrameView,
  41. meta: {
  42. icon: 'mdi:github',
  43. target: VBEN_GITHUB_URL,
  44. title: 'Github',
  45. },
  46. },
  47. ],
  48. },
  49. ];