增加工具栏提示。
This commit is contained in:
parent
6a56d6751d
commit
66a87a32c9
@ -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',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user