fallback.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import type { RouteRecordRaw } from 'vue-router';
  2. import { $t } from '@vben/locales/helper';
  3. import { BasicLayout } from '#/layouts';
  4. const routes: RouteRecordRaw[] = [
  5. {
  6. component: BasicLayout,
  7. meta: {
  8. icon: 'mdi:lightbulb-error-outline',
  9. title: $t('page.fallback.title'),
  10. },
  11. name: 'FallbackLayout',
  12. path: '/fallback',
  13. redirect: '/fallback/403',
  14. children: [
  15. {
  16. name: 'Fallback403',
  17. path: '403',
  18. component: () => import('#/views/_essential/fallback/forbidden.vue'),
  19. meta: {
  20. icon: 'mdi:do-not-disturb-alt',
  21. title: '403',
  22. },
  23. },
  24. {
  25. name: 'Fallback404',
  26. path: '404',
  27. component: () => import('#/views/_essential/fallback/not-found.vue'),
  28. meta: {
  29. icon: 'mdi:table-off',
  30. title: '404',
  31. },
  32. },
  33. {
  34. name: 'Fallback500',
  35. path: '500',
  36. component: () =>
  37. import('#/views/_essential/fallback/internal-error.vue'),
  38. meta: {
  39. icon: 'mdi:server-network-off',
  40. title: '500',
  41. },
  42. },
  43. {
  44. name: 'FallbackOffline',
  45. path: 'offline',
  46. component: () => import('#/views/_essential/fallback/offline.vue'),
  47. meta: {
  48. icon: 'mdi:offline',
  49. title: $t('fallback.offline'),
  50. },
  51. },
  52. ],
  53. },
  54. ];
  55. export default routes;