system.js 960 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import Layout from '@/layout/index.vue'
  2. import { createNameComponent } from '../createNode'
  3. const route = [
  4. {
  5. path: '/system',
  6. component: Layout,
  7. redirect: '/404',
  8. hideMenu: true,
  9. meta: { title: '系统目录' },
  10. children: [
  11. {
  12. path: '/404',
  13. component: createNameComponent(() => import('@/views/system/404.vue')),
  14. meta: { title: '404', hideTabs: true },
  15. },
  16. {
  17. path: '/401',
  18. component: createNameComponent(() => import('@/views/system/401.vue')),
  19. meta: { title: '401', hideTabs: true },
  20. },
  21. {
  22. path: '/redirect/:path(.*)',
  23. component: createNameComponent(() => import('@/views/system/redirect.vue')),
  24. meta: { title: 'redirect', hideTabs: true },
  25. },
  26. ],
  27. },
  28. {
  29. // 找不到路由重定向到404页面
  30. path: '/:pathMatch(.*)',
  31. component: Layout,
  32. redirect: '/404',
  33. hideMenu: true,
  34. },
  35. ]
  36. export default route