From 989abcae89255252bcbe4a9aaa7b7481d408a348 Mon Sep 17 00:00:00 2001 From: dengqichen Date: Fri, 13 Dec 2024 12:44:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B7=A5=E5=85=B7=E6=A0=8F?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/Workflow/Definition/Design/constants.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/Workflow/Definition/Design/constants.ts b/frontend/src/pages/Workflow/Definition/Design/constants.ts index b106bd49..d34fa004 100644 --- a/frontend/src/pages/Workflow/Definition/Design/constants.ts +++ b/frontend/src/pages/Workflow/Definition/Design/constants.ts @@ -3,7 +3,7 @@ export const PORT_GROUPS = ['top', 'right', 'bottom', 'left'] as const; // 转换后端端口配置为X6格式 export const convertPortConfig = (ports: any = {}) => { - const { groups = {}, types = [] } = ports; + const { groups = {} } = ports; // 转换groups配置 const processedGroups: any = {}; @@ -20,9 +20,9 @@ export const convertPortConfig = (ports: any = {}) => { }; }); - // 转换items配置 - const items = types.map(type => ({ - group: type + // 如果没有types,就用groups的key作为默认的items + const items = Object.keys(groups).map(group => ({ + group: group })); return {