You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
3.6 KiB

7 months ago
7 months ago
7 months ago
  1. import { MockMethod } from 'vite-plugin-mock'
  2. export default [
  3. {
  4. url: '/api/v1/menus',
  5. method: 'get',
  6. response: () => {
  7. return {
  8. code: 200,
  9. message: 'Success',
  10. data: [
  11. {
  12. id:1,
  13. path: '/welcome',
  14. name: '欢迎',
  15. icon: 'ApplicationMenu',
  16. component: './pages/dashboard',
  17. type: 1,
  18. order: 1,
  19. },
  20. {
  21. id:2,
  22. path: '/admin',
  23. name: '系统管理',
  24. icon: 'SettingTwo',
  25. access: 'canAdmin',
  26. type: 1,
  27. order: 2,
  28. children: [
  29. {
  30. id:3,
  31. path: '/admin/menus',
  32. name: '导航管理',
  33. icon: 'AllApplication',
  34. component: './pages/system/menus',
  35. type: 1,
  36. },
  37. {
  38. id:4,
  39. path: '/admin/users',
  40. name: '用户管理',
  41. icon: 'PeoplesTwo',
  42. component: './pages/system/users',
  43. type: 1,
  44. },
  45. {
  46. id:5,
  47. path: '/admin/departments',
  48. name: '部门管理',
  49. icon: 'Browser',
  50. component: './pages/system/departments',
  51. type: 1,
  52. },
  53. {
  54. id:6,
  55. path: '/admin/roles',
  56. name: '角色管理',
  57. icon: 'Permissions',
  58. component: './pages/system/roles',
  59. type: 1,
  60. },
  61. ],
  62. },
  63. {
  64. id:7,
  65. name: '列表页',
  66. icon: 'ListView',
  67. path: '/list',
  68. type: 1,
  69. children: [
  70. {
  71. id:8,
  72. path: '/list/index',
  73. name: '列表页面',
  74. component: './pages/list/list',
  75. type: 1,
  76. },
  77. {
  78. id:9,
  79. path: '/list/tree',
  80. name: '树形列表页面',
  81. component: './pages/list/tree',
  82. type: 1,
  83. },
  84. ],
  85. },
  86. {
  87. id:10,
  88. path: 'https://ant.design',
  89. name: 'Ant Design 官网外链',
  90. type: 3,
  91. },
  92. ]
  93. }
  94. }
  95. }
  96. ] as MockMethod[]