From 4cfa110f2f6bac0ec93e40b3bd06332002f61b79 Mon Sep 17 00:00:00 2001 From: v-zhangjc9 Date: Fri, 18 Jul 2025 11:07:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20=E5=A2=9E=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E7=BB=84=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service-web/client/src/components/flow/Helper.tsx | 6 ++++++ service-web/client/src/components/flow/node/CodeNode.tsx | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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(() => {