menu.ts 747 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. },
  24. ];
  25. return result;
  26. };
  27. export default [
  28. {
  29. url: '/api/menu/list',
  30. timeout: 1000,
  31. method: 'get',
  32. response: () => {
  33. const list = menuList();
  34. return resultSuccess({
  35. list,
  36. });
  37. },
  38. },
  39. ];