menu.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import { resultSuccess } from '../_util';
  2. const menuList = () => {
  3. const result: any[] = [
  4. {
  5. label: 'Dashboard',
  6. key: 'dashboard',
  7. type: 1,
  8. subtitle: 'dashboard',
  9. openType: 1,
  10. auth: 'dashboard',
  11. path: '/dashboard',
  12. children: [
  13. {
  14. label: '主控台',
  15. key: 'console',
  16. type: 1,
  17. subtitle: 'console',
  18. openType: 1,
  19. auth: 'console',
  20. path: '/dashboard/console',
  21. },
  22. {
  23. label: '工作台',
  24. key: 'workplace',
  25. type: 1,
  26. subtitle: 'workplace',
  27. openType: 1,
  28. auth: 'workplace',
  29. path: '/dashboard/workplace',
  30. },
  31. ],
  32. },
  33. {
  34. label: '表单管理',
  35. key: 'form',
  36. type: 1,
  37. subtitle: 'form',
  38. openType: 1,
  39. auth: 'form',
  40. path: '/form',
  41. children: [
  42. {
  43. label: '基础表单',
  44. key: 'basic-form',
  45. type: 1,
  46. subtitle: 'basic-form',
  47. openType: 1,
  48. auth: 'basic-form',
  49. path: '/form/basic-form',
  50. },
  51. {
  52. label: '分步表单',
  53. key: 'step-form',
  54. type: 1,
  55. subtitle: 'step-form',
  56. openType: 1,
  57. auth: 'step-form',
  58. path: '/form/step-form',
  59. },
  60. {
  61. label: '表单详情',
  62. key: 'detail',
  63. type: 1,
  64. subtitle: 'detail',
  65. openType: 1,
  66. auth: 'detail',
  67. path: '/form/detail',
  68. },
  69. ],
  70. },
  71. ];
  72. return result;
  73. };
  74. export default [
  75. {
  76. url: '/api/menu/list',
  77. timeout: 1000,
  78. method: 'get',
  79. response: () => {
  80. const list = menuList();
  81. return resultSuccess({
  82. list,
  83. });
  84. },
  85. },
  86. ];