diff --git a/service-web/client/src/components/flow/component/AddNodeButton.tsx b/service-web/client/src/components/flow/component/AddNodeButton.tsx index d3e0e47..a668469 100644 --- a/service-web/client/src/components/flow/component/AddNodeButton.tsx +++ b/service-web/client/src/components/flow/component/AddNodeButton.tsx @@ -1,20 +1,21 @@ +import {PlusCircleFilled} from '@ant-design/icons' +import {Button, Dropdown} from 'antd' +import type {ButtonProps} from 'antd/lib' import {isEqual, randomId, unique} from 'licia' -import {NodeRegistry, NodeRegistryMap} from '../NodeRegistry.tsx' import {commonInfo} from '../../../util/amis.tsx' import {checkAddNode} from '../FlowChecker.tsx' -import {Button, Dropdown} from 'antd' -import {PlusCircleFilled} from '@ant-design/icons' +import {NodeRegistry, NodeRegistryMap} from '../NodeRegistry.tsx' import {useDataStore} from '../store/DataStore.ts' import {useFlowStore} from '../store/FlowStore.ts' -import type {ButtonProps} from 'antd/lib' -export type AddNodeButtonProps = { +export type AddNodeButtonProps = ButtonProps & { parent?: string -} & ButtonProps + onlyIcon?: boolean +} const AddNodeButton = (props: AddNodeButtonProps) => { const {data, setDataById} = useDataStore() - const {nodes, addNode, edges,} = useFlowStore() + const {nodes, addNode, edges} = useFlowStore() return ( { ...(props.parent ? { parentId: props.parent, extent: 'parent', - } : {}) + } : {}), }) } catch (e) { // @ts-ignore @@ -68,7 +69,7 @@ const AddNodeButton = (props: AddNodeButtonProps) => { > ) diff --git a/service-web/client/src/components/flow/node/LoopNode.tsx b/service-web/client/src/components/flow/node/LoopNode.tsx index 57a5daa..9a853c5 100644 --- a/service-web/client/src/components/flow/node/LoopNode.tsx +++ b/service-web/client/src/components/flow/node/LoopNode.tsx @@ -23,6 +23,21 @@ const LoopNode = (props: NodeProps) => { }, [props.id]) const columnsSchema = useCallback(() => [ + { + type: 'switch', + name: 'failFast', + label: '快速失败', + description: '执行过程中一旦出现错误,及时中断循环任务的执行', + }, + { + disabled: true, + type: 'switch', + name: 'parallel', + label: '并行执行', + }, + { + type: 'divider', + }, ...outputsFormColumns(false, true), ], [props.id]) @@ -48,7 +63,7 @@ const LoopNode = (props: NodeProps) => { color={flowDotColor} bgColor={flowBackgroundColor} /> - + } columnSchema={columnsSchema}