增加工具栏提示。
This commit is contained in:
parent
6a56d6751d
commit
66a87a32c9
@ -98,11 +98,18 @@ const WorkflowDesign: React.FC = () => {
|
|||||||
// 根据节点类型动态注册
|
// 根据节点类型动态注册
|
||||||
const nodeConfig = {
|
const nodeConfig = {
|
||||||
inherit: nodeData.graph.shape === 'circle' ? 'circle' :
|
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,
|
width: nodeData.graph.size.width,
|
||||||
height: nodeData.graph.size.height,
|
height: nodeData.graph.size.height,
|
||||||
attrs: {
|
attrs: {
|
||||||
body: nodeData.graph.style,
|
body: {
|
||||||
|
...nodeData.graph.style,
|
||||||
|
// 如果是菱形,添加 refPoints
|
||||||
|
...(nodeData.graph.shape === 'diamond' ? {
|
||||||
|
refPoints: '50,0 100,50 50,100 0,50'
|
||||||
|
} : {})
|
||||||
|
},
|
||||||
label: {
|
label: {
|
||||||
text: nodeData.name,
|
text: nodeData.name,
|
||||||
fill: '#000000',
|
fill: '#000000',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user