From fe0b85919eb40c3771ef01e5e084fbfa3a36e814 Mon Sep 17 00:00:00 2001 From: ZLY Date: Mon, 3 Nov 2025 11:06:17 +0800 Subject: [PATCH] =?UTF-8?q?pref(flow):=E4=BC=98=E5=8C=96=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E9=80=BB=E8=BE=91=E5=B9=B6=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useFlowCallbacks.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/hooks/useFlowCallbacks.ts b/src/hooks/useFlowCallbacks.ts index b856faf..c278bbe 100644 --- a/src/hooks/useFlowCallbacks.ts +++ b/src/hooks/useFlowCallbacks.ts @@ -1151,8 +1151,7 @@ export const useFlowCallbacks = ( const newRevertedData = reverseConvertFlowData(nodes, edges, upDatePublishCB); const { flowData, currentAppData, info } = store.getState().ideContainer; const { deleteEventSendNodeList, deleteEventlisteneList } = handelEventNodeList(newRevertedData); - console.log('事件处理数据', deleteEventSendNodeList, deleteEventlisteneList); - // return; + let params = {}; // 更新复合组件/子流程 if (currentAppData.key.includes('sub')) { @@ -1169,6 +1168,12 @@ export const useFlowCallbacks = ( // 更新事件枚举表 const res1: any = await queryEventItemBySceneIdOld(info.id); if (res1.code === 200) dispatch(updateEventListOld(res1.data)); + + // 更新缓存数据 - 与主流程保持一致 + dispatch(updateCanvasDataMap({ + ...canvasDataMap, + [currentAppData.id]: { nodes, edges } + })); } else { Message.error(res.message); @@ -1218,10 +1223,6 @@ export const useFlowCallbacks = ( } } else { - const params = { - nodes, - edges - }; const appFlowParams = { appEventList: {} };