basic.ts 1.4 KB

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