From 3232a2e08ff417d7801d985f0fc0f564a0aa5420 Mon Sep 17 00:00:00 2001 From: ZLY Date: Thu, 30 Oct 2025 10:33:52 +0800 Subject: [PATCH] =?UTF-8?q?feat(flow):=20=E5=BA=94=E7=94=A8=E7=BC=96?= =?UTF-8?q?=E6=8E=92=E6=B7=BB=E5=8A=A0=E4=BF=9D=E5=AD=98=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E5=92=8C=E5=A4=B1=E8=B4=A5=E7=9A=84=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useFlowCallbacks.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/hooks/useFlowCallbacks.ts b/src/hooks/useFlowCallbacks.ts index e08d838..f0bc3dd 100644 --- a/src/hooks/useFlowCallbacks.ts +++ b/src/hooks/useFlowCallbacks.ts @@ -1243,13 +1243,19 @@ export const useFlowCallbacks = ( ...item, eventId: Array.from(new Set(item.eventId)) })); - - updateAppFlowData(appFlowParams); - if (appEventParams.length > 0) { - for (const item of appEventParams) { - await sleep(500); - updateAppEventChannel(item); + try { + updateAppFlowData(appFlowParams); + if (appEventParams.length > 0) { + for (const item of appEventParams) { + await sleep(500); + await updateAppEventChannel(item); + } } + + Message.success('保存成功'); + } catch (error) { + console.error('保存失败:', error); + Message.error('保存失败: ' + (error.message)); } } }, [nodes, edges, initialData?.appId]);