routes.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Just a mock data
  2. export const constantRoutes = [
  3. {
  4. path: '/redirect',
  5. component: 'layout/Layout',
  6. hidden: true,
  7. children: [
  8. {
  9. path: '/redirect/:path*',
  10. component: 'views/redirect/index'
  11. }
  12. ]
  13. },
  14. {
  15. path: '/login',
  16. component: 'views/login/index',
  17. hidden: true
  18. },
  19. {
  20. path: '/auth-redirect',
  21. component: 'views/login/auth-redirect',
  22. hidden: true
  23. },
  24. {
  25. path: '/404',
  26. component: 'views/error-page/404',
  27. hidden: true
  28. },
  29. {
  30. path: '/401',
  31. component: 'views/error-page/401',
  32. hidden: true
  33. },
  34. {
  35. path: '',
  36. component: 'layout/Layout',
  37. redirect: 'dashboard',
  38. children: [
  39. {
  40. path: 'dashboard',
  41. component: 'views/dashboard/index',
  42. name: 'Dashboard',
  43. meta: { title: 'Dashboard', icon: 'dashboard', affix: true }
  44. }
  45. ]
  46. }
  47. ]
  48. export const asyncRoutes = [
  49. {
  50. path: '/i18n',
  51. component: 'layout/Layout',
  52. children: [
  53. {
  54. path: 'index',
  55. component: 'views/i18n-demo/index',
  56. name: 'I18n',
  57. meta: { title: 'I18n', icon: 'international' }
  58. }
  59. ]
  60. },
  61. {
  62. path: 'external-link',
  63. component: 'layout/Layout',
  64. children: [
  65. {
  66. path: 'https://github.com/PanJiaChen/vue-element-admin',
  67. meta: { title: 'External Link', icon: 'link' }
  68. }
  69. ]
  70. },
  71. { path: '*', redirect: '/404', hidden: true }
  72. ]