base.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import type { AppRouteRecordRaw } from '@/router/types'
  2. import { asyncRoutes, RedirectName } from '@/router/constant'
  3. // 404 on a page
  4. export const ErrorPageRoute: AppRouteRecordRaw = {
  5. path: '/:path(.*)*',
  6. name: '错误',
  7. component: asyncRoutes.Layout,
  8. meta: {
  9. title: '错误',
  10. hideBreadcrumb: true
  11. },
  12. children: [
  13. {
  14. path: '/:path(.*)*',
  15. name: 'ErrorPageSon',
  16. component: asyncRoutes.ErrorPage,
  17. meta: {
  18. title: '错误',
  19. hideBreadcrumb: true
  20. }
  21. }
  22. ]
  23. }
  24. export const RedirectRoute: AppRouteRecordRaw = {
  25. path: '/redirect',
  26. name: RedirectName,
  27. component: asyncRoutes.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. }
  44. export const BaseRoute: AppRouteRecordRaw = {
  45. path: '/',
  46. name: 'home',
  47. component: asyncRoutes.Layout,
  48. meta: {
  49. title: '工作台',
  50. hideBreadcrumb: true
  51. },
  52. children: []
  53. }