2
0

node-registries.tsx 831 B

123456789101112131415161718192021222324252627282930
  1. import { WorkflowNodeRegistry } from '@flowgram.ai/free-layout-editor';
  2. /**
  3. * You can customize your own node registry
  4. * 你可以自定义节点的注册器
  5. */
  6. export const nodeRegistries: WorkflowNodeRegistry[] = [
  7. {
  8. type: 'start',
  9. meta: {
  10. isStart: true, // Mark as start
  11. deleteDisable: true, // The start node cannot be deleted
  12. copyDisable: true, // The start node cannot be copied
  13. defaultPorts: [{ type: 'output' }], // Used to define the input and output ports, the start node only has the output port
  14. },
  15. },
  16. {
  17. type: 'end',
  18. meta: {
  19. deleteDisable: true,
  20. copyDisable: true,
  21. defaultPorts: [{ type: 'input' }],
  22. },
  23. },
  24. {
  25. type: 'custom',
  26. meta: {},
  27. defaultPorts: [{ type: 'output' }, { type: 'input' }], // A normal node has two ports
  28. },
  29. ];