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 {