base.ts 918 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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: 'ErrorPage',
  7. component: Layout,
  8. meta: {
  9. title: 'ErrorPage',
  10. hideBreadcrumb: true,
  11. },
  12. children: [
  13. {
  14. path: '/:path(.*)*',
  15. name: 'ErrorPageSon',
  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,
  27. component: Layout,
  28. meta: {
  29. title: RedirectName,
  30. },
  31. children: [
  32. {
  33. path: '/redirect/:path(.*)',
  34. name: RedirectName,
  35. component: () => import('@/views/redirect/index.vue'),
  36. meta: {
  37. title: RedirectName,
  38. hideBreadcrumb: true,
  39. },
  40. },
  41. ],
  42. };