vue-wiring-diagram 1.1.21 → 1.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -93
- package/dist/style.css +1 -1
- package/dist/vue-wiring-diagram.es.js +6235 -5903
- package/dist/vue-wiring-diagram.umd.js +29 -29
- package/package.json +1 -1
- package/packages/components/Shortcuts.vue +31 -31
- package/packages/components/baseShape.js +62 -62
- package/packages/components/common.js +105 -105
- package/packages/components/edge-control/arrow-line.vue +292 -292
- package/packages/components/edge-control/condition.vue +110 -110
- package/packages/components/edge-control/default-line.vue +156 -156
- package/packages/components/edge-control/index.vue +94 -94
- package/packages/components/edge-control/pipe-line.vue +354 -354
- package/packages/components/editor/index.vue +590 -590
- package/packages/components/enums.js +80 -80
- package/packages/components/graph-control/index.vue +121 -121
- package/packages/components/image-control/group-form.vue +114 -114
- package/packages/components/image-control/image-condition.vue +117 -0
- package/packages/components/image-control/image-form.vue +184 -184
- package/packages/components/image-control/image-management.vue +213 -213
- package/packages/components/image-control/index.vue +290 -124
- package/packages/components/portsOptions.js +21 -21
- package/packages/components/preview/index.vue +399 -347
- package/packages/components/settings.js +262 -262
- package/packages/components/text-control/index.vue +457 -457
- package/packages/components/tools.js +256 -256
- package/packages/http.js +104 -104
- package/packages/index.js +43 -43
- package/packages/styles/animation.scss +27 -27
- package/packages/styles/dialog.scss +4 -4
- package/packages/styles/editor.scss +165 -165
- package/packages/styles/elPath.scss +257 -257
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author: HuaYJ
|
|
3
|
-
* @Date: 2025/4/9 09:22
|
|
4
|
-
*/
|
|
5
|
-
<template>
|
|
6
|
-
<div class="container">
|
|
7
|
-
<div class="row-column" style="padding:5px 1px 10px">
|
|
8
|
-
<el-row :gutter="20">
|
|
9
|
-
<el-col :span="12">
|
|
10
|
-
<div class="row-label">线段类型</div>
|
|
11
|
-
</el-col>
|
|
12
|
-
<el-col :span="12">
|
|
13
|
-
<el-select v-model="type" placeholder="请选择线段类型" clearable size="small" @change="changeType">
|
|
14
|
-
<el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value">
|
|
15
|
-
</el-option>
|
|
16
|
-
</el-select>
|
|
17
|
-
</el-col>
|
|
18
|
-
</el-row>
|
|
19
|
-
</div>
|
|
20
|
-
<component :is="component" :payload="payload" :itemId="itemId"></component>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script setup>
|
|
25
|
-
import {ARROW, LINE, PIPE, typeList} from "packages/components/enums.js";
|
|
26
|
-
import {onMounted, ref, shallowRef} from "vue";
|
|
27
|
-
import {arrowOptions, defaultLine, lineOptions, pipeOptions} from "packages/components/settings.js";
|
|
28
|
-
import DefaultLine from "packages/components/edge-control/default-line.vue";
|
|
29
|
-
import PipeLine from "packages/components/edge-control/pipe-line.vue";
|
|
30
|
-
import ArrowLine from "packages/components/edge-control/arrow-line.vue";
|
|
31
|
-
|
|
32
|
-
const props = defineProps({
|
|
33
|
-
payload: Object,
|
|
34
|
-
itemId: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: ''
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
// 线段类型
|
|
41
|
-
const type = ref(props.payload.data.type)
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* 更改线段类型
|
|
45
|
-
*/
|
|
46
|
-
const changeType = () => {
|
|
47
|
-
props.payload.data.type = type.value
|
|
48
|
-
if (type.value === LINE) {
|
|
49
|
-
lineOptions.attrs = defaultLine.attrs
|
|
50
|
-
lineOptions.markup = defaultLine.markup
|
|
51
|
-
}
|
|
52
|
-
if (type.value === PIPE) {
|
|
53
|
-
lineOptions.attrs = pipeOptions.attrs
|
|
54
|
-
lineOptions.markup = pipeOptions.markup
|
|
55
|
-
}
|
|
56
|
-
if (type.value === ARROW) {
|
|
57
|
-
lineOptions.attrs = arrowOptions.attrs
|
|
58
|
-
lineOptions.markup = arrowOptions.markup
|
|
59
|
-
}
|
|
60
|
-
props.payload.attrs = null
|
|
61
|
-
props.payload.attr(lineOptions.attrs)
|
|
62
|
-
props.payload.markup = lineOptions.markup
|
|
63
|
-
setComponent()
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// 组件
|
|
67
|
-
const component = shallowRef(null)
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* 设置组件
|
|
71
|
-
*/
|
|
72
|
-
const setComponent = () => {
|
|
73
|
-
component.value = null
|
|
74
|
-
if (type.value === LINE) {
|
|
75
|
-
component.value = DefaultLine
|
|
76
|
-
}
|
|
77
|
-
if (type.value === PIPE) {
|
|
78
|
-
component.value = PipeLine
|
|
79
|
-
}
|
|
80
|
-
if (type.value === ARROW) {
|
|
81
|
-
component.value = ArrowLine
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
onMounted(() => {
|
|
86
|
-
setComponent()
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
</script>
|
|
90
|
-
|
|
91
|
-
<style scoped lang="scss">
|
|
92
|
-
@use "../../styles/editor.scss";
|
|
93
|
-
|
|
94
|
-
</style>
|
|
1
|
+
/**
|
|
2
|
+
* @Author: HuaYJ
|
|
3
|
+
* @Date: 2025/4/9 09:22
|
|
4
|
+
*/
|
|
5
|
+
<template>
|
|
6
|
+
<div class="container">
|
|
7
|
+
<div class="row-column" style="padding:5px 1px 10px">
|
|
8
|
+
<el-row :gutter="20">
|
|
9
|
+
<el-col :span="12">
|
|
10
|
+
<div class="row-label">线段类型</div>
|
|
11
|
+
</el-col>
|
|
12
|
+
<el-col :span="12">
|
|
13
|
+
<el-select v-model="type" placeholder="请选择线段类型" clearable size="small" @change="changeType">
|
|
14
|
+
<el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value">
|
|
15
|
+
</el-option>
|
|
16
|
+
</el-select>
|
|
17
|
+
</el-col>
|
|
18
|
+
</el-row>
|
|
19
|
+
</div>
|
|
20
|
+
<component :is="component" :payload="payload" :itemId="itemId"></component>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup>
|
|
25
|
+
import {ARROW, LINE, PIPE, typeList} from "packages/components/enums.js";
|
|
26
|
+
import {onMounted, ref, shallowRef} from "vue";
|
|
27
|
+
import {arrowOptions, defaultLine, lineOptions, pipeOptions} from "packages/components/settings.js";
|
|
28
|
+
import DefaultLine from "packages/components/edge-control/default-line.vue";
|
|
29
|
+
import PipeLine from "packages/components/edge-control/pipe-line.vue";
|
|
30
|
+
import ArrowLine from "packages/components/edge-control/arrow-line.vue";
|
|
31
|
+
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
payload: Object,
|
|
34
|
+
itemId: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ''
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
// 线段类型
|
|
41
|
+
const type = ref(props.payload.data.type)
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 更改线段类型
|
|
45
|
+
*/
|
|
46
|
+
const changeType = () => {
|
|
47
|
+
props.payload.data.type = type.value
|
|
48
|
+
if (type.value === LINE) {
|
|
49
|
+
lineOptions.attrs = defaultLine.attrs
|
|
50
|
+
lineOptions.markup = defaultLine.markup
|
|
51
|
+
}
|
|
52
|
+
if (type.value === PIPE) {
|
|
53
|
+
lineOptions.attrs = pipeOptions.attrs
|
|
54
|
+
lineOptions.markup = pipeOptions.markup
|
|
55
|
+
}
|
|
56
|
+
if (type.value === ARROW) {
|
|
57
|
+
lineOptions.attrs = arrowOptions.attrs
|
|
58
|
+
lineOptions.markup = arrowOptions.markup
|
|
59
|
+
}
|
|
60
|
+
props.payload.attrs = null
|
|
61
|
+
props.payload.attr(lineOptions.attrs)
|
|
62
|
+
props.payload.markup = lineOptions.markup
|
|
63
|
+
setComponent()
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// 组件
|
|
67
|
+
const component = shallowRef(null)
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 设置组件
|
|
71
|
+
*/
|
|
72
|
+
const setComponent = () => {
|
|
73
|
+
component.value = null
|
|
74
|
+
if (type.value === LINE) {
|
|
75
|
+
component.value = DefaultLine
|
|
76
|
+
}
|
|
77
|
+
if (type.value === PIPE) {
|
|
78
|
+
component.value = PipeLine
|
|
79
|
+
}
|
|
80
|
+
if (type.value === ARROW) {
|
|
81
|
+
component.value = ArrowLine
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
onMounted(() => {
|
|
86
|
+
setComponent()
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
<style scoped lang="scss">
|
|
92
|
+
@use "../../styles/editor.scss";
|
|
93
|
+
|
|
94
|
+
</style>
|