vben.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { preferences } from '@vben-core/preferences';
  2. import type { RouteRecordRaw } from 'vue-router';
  3. import { BasicLayout, IFrameView } from '@/layouts';
  4. import { VBEN_GITHUB_URL } from '@vben/constants';
  5. import { $t } from '@vben/locales/helper';
  6. const routes: RouteRecordRaw[] = [
  7. {
  8. component: BasicLayout,
  9. meta: {
  10. icon: preferences.logo.source,
  11. title: 'Vben',
  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. ];
  50. export default routes;