From 49d06a91307a2a5b3dd464ea6b3c5a43ceb95990 Mon Sep 17 00:00:00 2001 From: ZLY Date: Mon, 3 Nov 2025 14:26:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(flow):=20=E6=B7=BB=E5=8A=A0=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E8=BF=9E=E7=BA=BF=E5=A4=84=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useFlowCallbacks.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/hooks/useFlowCallbacks.ts b/src/hooks/useFlowCallbacks.ts index c278bbe..737beae 100644 --- a/src/hooks/useFlowCallbacks.ts +++ b/src/hooks/useFlowCallbacks.ts @@ -1224,7 +1224,8 @@ export const useFlowCallbacks = ( } else { const appFlowParams = { - appEventList: {} + appEventList: {}, + eventEdges: [] }; nodes.forEach(node => { @@ -1236,6 +1237,21 @@ export const useFlowCallbacks = ( const eventMap = new Map(); edges.forEach((edge: any) => { + console.log('edge:', edge); + + // 处理事件连线 + appFlowParams.eventEdges.push({ + id: edge.id, + source: edge.source, + target: edge.target, + lineType: 'data', + data: { + displayData: { + ...edge.data.displayData + } + } + }); + // 应用组件的桩点id就是事件id const sourceId = edge.sourceHandle; const targetId = edge.targetHandle; @@ -1260,7 +1276,7 @@ export const useFlowCallbacks = ( eventId: Array.from(new Set(item.eventId)) })); try { - updateAppFlowData(appEventParams); + updateAppFlowData(appFlowParams); if (appEventParams.length > 0) { for (const item of appEventParams) { await sleep(500);