diff --git a/service-web/client/src/components/flow/Helper.tsx b/service-web/client/src/components/flow/Helper.tsx index 066cc58..f8bd614 100644 --- a/service-web/client/src/components/flow/Helper.tsx +++ b/service-web/client/src/components/flow/Helper.tsx @@ -117,6 +117,8 @@ const numberOperators: ConditionOperator[] = [ {label: '小于或等于', value: 'less_equal'}, ] const numberDefaultOperator: string = 'equal' +const arrayOperators: ConditionOperator[] = ['is_empty', 'is_not_empty'] +const arrayDefaultOperator: string = 'is_empty' export const generateAllIncomerOutputVariablesConditions: (id: string, inputSchema: Record>, nodes: Node[], edges: Edge[], data: any) => Option[] = (id, inputSchema, nodes, edges, data) => { let optionMap: Record = {} @@ -159,6 +161,10 @@ export const generateAllIncomerOutputVariablesConditions: (id: string, inputSche defaultOp: numberDefaultOperator, operators: numberOperators, } : {}), + ...((item.type === 'array-text' || item.type === 'array-object') ? { + defaultOp: arrayDefaultOperator, + operators: arrayOperators, + } : {}), }) } return Object.keys(optionMap) diff --git a/service-web/client/src/components/flow/node/CodeNode.tsx b/service-web/client/src/components/flow/node/CodeNode.tsx index 1081e50..87fb721 100644 --- a/service-web/client/src/components/flow/node/CodeNode.tsx +++ b/service-web/client/src/components/flow/node/CodeNode.tsx @@ -45,7 +45,7 @@ const CodeNode = (props: NodeProps) => { { type: 'divider', }, - ...outputsFormColumns(true, true), + ...outputsFormColumns(true, false), ], [props.id]) const extraNodeDescription = useMemo(() => {