toolbar.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. {
  31. name: '开始',
  32. type: 'start',
  33. icon: 'lucide:play',
  34. component: 'Start',
  35. id: 'start-node',
  36. data: {},
  37. active: false,
  38. isEdit: false
  39. },
  40. {
  41. name: '结束',
  42. type: 'end',
  43. icon: 'lucide:unplug',
  44. component: 'End',
  45. id: 'end-node-id',
  46. data: {},
  47. active: false,
  48. isEdit: false
  49. },
  50. {
  51. name: 'HTTP请求',
  52. type: 'http',
  53. icon: 'lucide:link',
  54. component: 'Http',
  55. id: 'http-node-id',
  56. data: {},
  57. active: false,
  58. isEdit: false
  59. },
  60. {
  61. name: '条件分支',
  62. type: 'condition',
  63. icon: 'lucide:trending-up-down',
  64. component: 'Condition',
  65. id: 'condition-node-id',
  66. data: {},
  67. active: false,
  68. isEdit: false
  69. },
  70. {
  71. name: '代码执行',
  72. type: 'code',
  73. icon: 'lucide:code',
  74. component: 'Code',
  75. id: 'code-node-id',
  76. data: {},
  77. active: false,
  78. isEdit: false
  79. },
  80. {
  81. name: '数据查询',
  82. type: 'database',
  83. icon: 'lucide:database-zap',
  84. component: 'Database',
  85. id: 'data-query-node-id',
  86. data: {},
  87. active: false,
  88. isEdit: false
  89. }
  90. ]
  91. }
  92. ]