system.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. path: '/login',
  30. component: createNameComponent(() => import('@/views/system/login.vue')),
  31. hideMenu: true,
  32. meta: { title: '登录', hideTabs: true }
  33. },
  34. {
  35. // 找不到路由重定向到404页面
  36. path: "/:pathMatch(.*)",
  37. component: Layout,
  38. redirect: "/404",
  39. hideMenu: true
  40. },
  41. ]
  42. export default route