This repository has been archived by the owner on Jan 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
test.html
96 lines (89 loc) · 3.28 KB
/
test.html
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://unpkg.com/@krthr/vue-dataflow-editor@latest/dist/vue-dataflow-editor.css">
</head>
<body>
<div id="app">
<vue-blocks-container ref="container" :blocks-content="blocks" :scene.sync="scene" class="container" />
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js">
</script>
<script src="https://unpkg.com/@krthr/vue-dataflow-editor@latest/dist/vue-dataflow-editor.umd.js"></script>
<script>
const app = new Vue({
data: function () {
return {
blocks: [{
name: 'test',
title: 'Test block',
family: 'Test',
description: 'Description text',
fields: [{
name: 'in1',
type: 'event',
attr: 'input'
},
{
name: 'in2',
type: 'event',
attr: 'input'
},
{
name: 'out1',
type: 'event',
attr: 'output'
},
{
name: 'out2',
type: 'event',
attr: 'output'
}
]
}],
scene: {
blocks: [{
id: 1,
x: 0,
y: 0,
name: 'test',
title: 'Test block',
values: {
property: [{
name: 'message',
type: 'string'
}]
}
},
{
id: 2,
x: 0,
y: 50,
name: 'test',
title: 'Test block 2',
values: {
property: [{
name: 'message',
type: 'string'
}]
}
}
],
links: [],
container: {
centerX: 0,
centerY: 0,
scale: 1
}
}
}
},
el: '#app'
})
</script>
</body>
</html>