data.js
1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* @Date: 2025-03-11 15:09:49
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-03-11 16:23:53
* @FilePath: /logic-flow2/src/views/node-view/data.js
* @Description: 文件描述
*/
const data = {
nodes: [
{
id: 'node_id_1',
type: 'UserTask',
x: 100,
y: 100,
text: { x: 100, y: 100, value: '节点1' },
properties: {
width: 100,
height: 100,
scale: 1, // 自定义放大倍数
isClicked: false, // 自定义是否被点击
},
},
{
id: 'node_id_2',
type: 'circle',
x: 200,
y: 300,
text: { x: 200, y: 300, value: '节点2' },
},
],
edges: [
{
id: 'edge_id',
type: 'polyline',
sourceNodeId: 'node_id_1',
targetNodeId: 'node_id_2',
text: { x: 139, y: 200, value: '连线' },
startPoint: { x: 100, y: 140 },
endPoint: { x: 200, y: 250 },
pointsList: [
{ x: 100, y: 140 },
{ x: 100, y: 200 },
{ x: 200, y: 200 },
{ x: 200, y: 250 },
],
},
],
};
export default data;