toolbar.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * @Author: liuJie
  3. * @Date: 2026-01-25 00:06:41
  4. * @LastEditors: liuJie
  5. * @LastEditTime: 2026-01-25 21:52:47
  6. * @Describe: 工具栏配置
  7. */
  8. export interface MaterialToolType {
  9. label: string;
  10. id: string;
  11. description: string;
  12. source: Array<SourceType>;
  13. };
  14. export interface SourceType {
  15. name: string;
  16. type: string;
  17. icon: string;
  18. component: string;
  19. id: string;
  20. data?: any;
  21. active: boolean;
  22. isEdit: boolean;
  23. };
  24. export const materialTools:MaterialToolType[] = [
  25. {
  26. label: '业务逻辑',
  27. id: 'basic-nodes',
  28. description: '业务节点',
  29. source: [{
  30. name: 'HTTP请求',
  31. type: 'http',
  32. icon: 'lucide:link',
  33. component: 'Http',
  34. id: 'http-node-id',
  35. data: {},
  36. active: false,
  37. isEdit: false,
  38. },
  39. {
  40. name: '条件分支',
  41. type: 'condition',
  42. icon: 'lucide:trending-up-down',
  43. component: 'Condition',
  44. id: 'condition-node-id',
  45. data: {},
  46. active: false,
  47. isEdit: false,
  48. },
  49. {
  50. name: '代码执行',
  51. type: 'code',
  52. icon: 'lucide:code',
  53. component: 'Code',
  54. id: 'code-node-id',
  55. data: {},
  56. active: false,
  57. isEdit: false,
  58. },
  59. {
  60. name: '数据查询',
  61. type: 'database',
  62. icon: 'lucide:database-zap',
  63. component: 'Database',
  64. id: 'data-query-node-id',
  65. data: {},
  66. active: false,
  67. isEdit: false,
  68. },
  69. ],
  70. }
  71. ];