routes.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. export default [
  2. {
  3. path: '/',
  4. component: '../layouts/BlankLayout',
  5. routes: [
  6. {
  7. path: '/user',
  8. component: '../layouts/UserLayout',
  9. routes: [
  10. {
  11. name: 'login',
  12. path: '/user/login',
  13. component: './User/login',
  14. },
  15. ],
  16. },
  17. {
  18. path: '/',
  19. component: '../layouts/SecurityLayout',
  20. routes: [
  21. {
  22. path: '/',
  23. component: '../layouts/BasicLayout',
  24. authority: ['admin', 'user'],
  25. routes: [
  26. {
  27. path: '/',
  28. redirect: '/welcome',
  29. },
  30. {
  31. path: '/welcome',
  32. name: 'welcome',
  33. icon: 'smile',
  34. component: './Welcome',
  35. },
  36. {
  37. path: '/admin',
  38. name: 'admin',
  39. icon: 'crown',
  40. component: './Admin',
  41. authority: ['admin'],
  42. routes: [
  43. {
  44. path: '/admin/sub-page',
  45. name: 'sub-page',
  46. icon: 'smile',
  47. component: './Welcome',
  48. authority: ['admin'],
  49. },
  50. ],
  51. },
  52. {
  53. name: 'list.table-list',
  54. icon: 'table',
  55. path: '/list',
  56. component: './TableList',
  57. },
  58. {
  59. component: './404',
  60. },
  61. ],
  62. },
  63. {
  64. component: './404',
  65. },
  66. ],
  67. },
  68. ],
  69. },
  70. {
  71. component: './404',
  72. },
  73. ];