condition.ts 574 B

123456789101112131415161718192021222324252627282930
  1. import { NodeConnectionTypes, type INodeType } from '../Interface'
  2. export const conditionNode: INodeType = {
  3. version: ['1'],
  4. displayName: '条件判断',
  5. name: 'condition',
  6. description: '根据条件判断',
  7. icon: 'lucide:trending-up-down',
  8. iconColor: '#b33be6',
  9. inputs: [NodeConnectionTypes.main],
  10. outputs: (data: any) => {
  11. return [NodeConnectionTypes.main]
  12. },
  13. // 业务数据
  14. schema: {
  15. appAgentId: '',
  16. parentId: '',
  17. position: {
  18. x: 20,
  19. y: 30
  20. },
  21. width: 96,
  22. height: 96,
  23. selected: false,
  24. nodeType: 'condition',
  25. zIndex: 1,
  26. data: {}
  27. }
  28. }