From 7bb5df9abc1c3ad46433d15a540b98c3167dc385 Mon Sep 17 00:00:00 2001 From: ZLY Date: Mon, 29 Sep 2025 15:39:14 +0800 Subject: [PATCH] =?UTF-8?q?pref(utils):=20=E4=BC=98=E5=8C=96convertFlowDat?= =?UTF-8?q?a=E5=88=9D=E5=A7=8B=E5=8C=96=E7=9A=84=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/convertFlowData.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/convertFlowData.ts b/src/utils/convertFlowData.ts index 6d9e862..351ec0d 100644 --- a/src/utils/convertFlowData.ts +++ b/src/utils/convertFlowData.ts @@ -11,7 +11,7 @@ export const convertFlowData = (flowData: any, useDefault = true) => { const nodes: any[] = []; const edges: any[] = []; - if (!flowData || Object.keys(flowData).length === 0) { + if (!flowData || Object.keys(flowData).length === 0 || flowData.main.nodeConfigs.length === 0) { // 如果useDefault为true且flowData为空,则返回默认的开始和结束节点 if (useDefault) { return { @@ -34,7 +34,7 @@ export const convertFlowData = (flowData: any, useDefault = true) => { { id: 'end', type: 'end', - position: { x: 1200, y: 200 }, + position: { x: 600, y: 200 }, data: { title: '结束', parameters: {