charts.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import type { AppRouteModule } from '/@/router/types';
  2. import { getParentLayout, LAYOUT } from '/@/router/constant';
  3. import { t } from '/@/hooks/web/useI18n';
  4. const charts: AppRouteModule = {
  5. path: '/charts',
  6. name: 'Charts',
  7. component: LAYOUT,
  8. redirect: '/charts/apexChart',
  9. meta: {
  10. icon: 'vaadin:spline-area-chart',
  11. title: t('routes.demo.charts.charts'),
  12. },
  13. children: [
  14. {
  15. path: 'apexChart',
  16. name: 'ApexChart',
  17. meta: {
  18. title: t('routes.demo.charts.apexChart'),
  19. },
  20. component: () => import('/@/views/demo/echarts/apex/index.vue'),
  21. },
  22. {
  23. path: 'echarts',
  24. name: 'Echarts',
  25. component: getParentLayout('Echarts'),
  26. meta: {
  27. title: 'Echarts',
  28. },
  29. redirect: '/charts/echarts/map',
  30. children: [
  31. {
  32. path: 'map',
  33. name: 'Map',
  34. component: () => import('/@/views/demo/echarts/Map.vue'),
  35. meta: {
  36. title: t('routes.demo.charts.map'),
  37. },
  38. },
  39. {
  40. path: 'line',
  41. name: 'Line',
  42. component: () => import('/@/views/demo/echarts/Line.vue'),
  43. meta: {
  44. title: t('routes.demo.charts.line'),
  45. },
  46. },
  47. {
  48. path: 'pie',
  49. name: 'Pie',
  50. component: () => import('/@/views/demo/echarts/Pie.vue'),
  51. meta: {
  52. title: t('routes.demo.charts.pie'),
  53. },
  54. },
  55. ],
  56. },
  57. ],
  58. };
  59. export default charts;