basic.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import type { AppRouteRecordRaw } from '/@/router/types';
  2. import { t } from '/@/hooks/web/useI18n';
  3. import {
  4. REDIRECT_NAME,
  5. LAYOUT,
  6. EXCEPTION_COMPONENT,
  7. PAGE_NOT_FOUND_NAME,
  8. } from '/@/router/constant';
  9. // 404 on a page
  10. export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
  11. path: '/:path(.*)*',
  12. name: PAGE_NOT_FOUND_NAME,
  13. component: LAYOUT,
  14. meta: {
  15. title: 'ErrorPage',
  16. hideBreadcrumb: true,
  17. hideMenu: true,
  18. },
  19. children: [
  20. {
  21. path: '/:path(.*)*',
  22. name: PAGE_NOT_FOUND_NAME,
  23. component: EXCEPTION_COMPONENT,
  24. meta: {
  25. title: 'ErrorPage',
  26. hideBreadcrumb: true,
  27. hideMenu: true,
  28. },
  29. },
  30. ],
  31. };
  32. export const REDIRECT_ROUTE: AppRouteRecordRaw = {
  33. path: '/redirect',
  34. name: REDIRECT_NAME,
  35. component: LAYOUT,
  36. meta: {
  37. title: REDIRECT_NAME,
  38. hideBreadcrumb: true,
  39. hideMenu: true,
  40. },
  41. children: [
  42. {
  43. path: '/redirect/:path(.*)',
  44. name: REDIRECT_NAME,
  45. component: () => import('/@/views/sys/redirect/index.vue'),
  46. meta: {
  47. title: REDIRECT_NAME,
  48. hideBreadcrumb: true,
  49. },
  50. },
  51. ],
  52. };
  53. export const ERROR_LOG_ROUTE: AppRouteRecordRaw = {
  54. path: '/error-log',
  55. name: 'ErrorLog',
  56. component: LAYOUT,
  57. redirect: '/error-log/list',
  58. meta: {
  59. title: 'ErrorLog',
  60. hideBreadcrumb: true,
  61. hideChildrenInMenu: true,
  62. },
  63. children: [
  64. {
  65. path: 'list',
  66. name: 'ErrorLogList',
  67. component: () => import('/@/views/sys/error-log/index.vue'),
  68. meta: {
  69. title: t('routes.basic.errorLogList'),
  70. hideBreadcrumb: true,
  71. currentActiveMenu: '/error-log',
  72. },
  73. },
  74. ],
  75. };