mirror of
https://gitee.com/ByteDance/flowgram.ai.git
synced 2025-07-07 17:43:29 +08:00
23 lines
493 B
TypeScript
23 lines
493 B
TypeScript
import { nanoid } from 'nanoid';
|
|
|
|
import { FlowNodeRegistry } from '../../typings';
|
|
import iconLoop from '../../assets/icon-loop.svg';
|
|
|
|
export const LoopNodeRegistry: FlowNodeRegistry = {
|
|
type: 'loop',
|
|
info: {
|
|
icon: iconLoop,
|
|
description:
|
|
'Used to repeatedly execute a series of tasks by setting the number of iterations and logic',
|
|
},
|
|
onAdd() {
|
|
return {
|
|
id: `loop_${nanoid(5)}`,
|
|
type: 'loop',
|
|
data: {
|
|
title: 'Loop',
|
|
},
|
|
};
|
|
},
|
|
};
|