editor.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import type { AppRouteModule } from '/@/router/types';
  2. import { getParentLayout, LAYOUT } from '/@/router/constant';
  3. import { t } from '/@/hooks/web/useI18n';
  4. const editor: AppRouteModule = {
  5. path: '/editor',
  6. name: 'Editor',
  7. component: LAYOUT,
  8. redirect: '/editor/markdown',
  9. meta: {
  10. icon: 'carbon:table-split',
  11. title: t('routes.demo.editor.editor'),
  12. },
  13. children: [
  14. {
  15. path: 'markdown',
  16. name: 'MarkdownDemo',
  17. component: () => import('/@/views/demo/editor/Markdown.vue'),
  18. meta: {
  19. title: t('routes.demo.editor.markdown'),
  20. },
  21. },
  22. {
  23. path: 'tinymce',
  24. component: getParentLayout('TinymceDemo'),
  25. name: 'TinymceDemo',
  26. meta: {
  27. title: t('routes.demo.editor.tinymce'),
  28. },
  29. redirect: '/editor/tinymce/index',
  30. children: [
  31. {
  32. path: 'index',
  33. name: 'TinymceBasicDemo',
  34. component: () => import('/@/views/demo/editor/tinymce/index.vue'),
  35. meta: {
  36. title: t('routes.demo.editor.tinymceBasic'),
  37. },
  38. },
  39. {
  40. path: 'editor',
  41. name: 'TinymceFormDemo',
  42. component: () => import('/@/views/demo/editor/tinymce/Editor.vue'),
  43. meta: {
  44. title: t('routes.demo.editor.tinymceForm'),
  45. },
  46. },
  47. ],
  48. },
  49. ],
  50. };
  51. export default editor;