diff --git a/frontend/src/pages/Workflow/Definition/Design/index.tsx b/frontend/src/pages/Workflow/Definition/Design/index.tsx index eeff5c26..0a20df13 100644 --- a/frontend/src/pages/Workflow/Definition/Design/index.tsx +++ b/frontend/src/pages/Workflow/Definition/Design/index.tsx @@ -98,11 +98,18 @@ const WorkflowDesign: React.FC = () => { // 根据节点类型动态注册 const nodeConfig = { inherit: nodeData.graph.shape === 'circle' ? 'circle' : - nodeData.graph.shape === 'polygon' ? 'polygon' : 'rect', + nodeData.graph.shape === 'polygon' ? 'polygon' : + nodeData.graph.shape === 'diamond' ? 'polygon' : 'rect', width: nodeData.graph.size.width, height: nodeData.graph.size.height, attrs: { - body: nodeData.graph.style, + body: { + ...nodeData.graph.style, + // 如果是菱形,添加 refPoints + ...(nodeData.graph.shape === 'diamond' ? { + refPoints: '50,0 100,50 50,100 0,50' + } : {}) + }, label: { text: nodeData.name, fill: '#000000',