base.ts 958 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import type { AppRouteRecordRaw } from '@/router/types';
  2. import { ErrorPage, RedirectName, Layout } from '@/router/constant';
  3. // 404 on a page
  4. export const ErrorPageRoute: AppRouteRecordRaw = {
  5. path: '/:path(.*)*',
  6. name: 'ErrorPageParent',
  7. component: Layout,
  8. meta: {
  9. title: 'ErrorPage',
  10. hideBreadcrumb: true,
  11. },
  12. children: [
  13. {
  14. path: '/:path(.*)*',
  15. name: 'ErrorPage',
  16. component: ErrorPage,
  17. meta: {
  18. title: 'ErrorPage',
  19. hideBreadcrumb: true,
  20. },
  21. },
  22. ],
  23. };
  24. export const RedirectRoute: AppRouteRecordRaw = {
  25. path: '/redirect',
  26. name: `${RedirectName}Parent`,
  27. component: Layout,
  28. meta: {
  29. title: RedirectName,
  30. hideBreadcrumb: true,
  31. },
  32. children: [
  33. {
  34. path: '/redirect/:path(.*)',
  35. name: RedirectName,
  36. component: () => import('@/views/redirect/index.vue'),
  37. meta: {
  38. title: RedirectName,
  39. hideBreadcrumb: true,
  40. },
  41. },
  42. ],
  43. };