@zhangqingcq/vgce 0.1.6 → 0.1.8
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 +118 -90
- package/dist/style.css +1 -1
- package/dist/vgce.js +10910 -10910
- package/dist/vgce.umd.cjs +45 -52
- package/package.json +1 -1
- package/src/assets/base.less +69 -68
- package/src/assets/svgs/clock-a.svg +7 -7
- package/src/assets/svgs/common-table.svg +1 -1
- package/src/assets/svgs/el-button.svg +1 -1
- package/src/assets/svgs/el-tag.svg +1 -13
- package/src/assets/svgs/light.svg +3 -9
- package/src/assets/svgs/now-time.svg +1 -1
- package/src/assets/svgs/pie-charts.svg +1 -1
- package/src/assets/svgs/svg-text.svg +1 -1
- package/src/assets/variables.less +6 -6
- package/src/components/svg-editor/center-panel.vue +3 -2
- package/src/components/svg-editor/index.vue +7 -5
- package/src/components/svg-viewer.vue +7 -4
- package/src/config/svg/stateful/alert-light.ts +1 -1
- package/src/utils/index.ts +3 -2
package/package.json
CHANGED
package/src/assets/base.less
CHANGED
@@ -3,112 +3,113 @@
|
|
3
3
|
*,
|
4
4
|
*::before,
|
5
5
|
*::after {
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
box-sizing: border-box;
|
7
|
+
margin: 0;
|
8
|
+
font-weight: normal;
|
9
9
|
}
|
10
10
|
|
11
11
|
body {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
12
|
+
font-family:
|
13
|
+
Inter,
|
14
|
+
-apple-system,
|
15
|
+
BlinkMacSystemFont,
|
16
|
+
'Segoe UI',
|
17
|
+
Roboto,
|
18
|
+
Oxygen,
|
19
|
+
Ubuntu,
|
20
|
+
Cantarell,
|
21
|
+
'Fira Sans',
|
22
|
+
'Droid Sans',
|
23
|
+
'Helvetica Neue',
|
24
|
+
sans-serif;
|
25
|
+
text-rendering: optimizeLegibility;
|
26
|
+
-webkit-font-smoothing: antialiased;
|
27
|
+
-moz-osx-font-smoothing: grayscale;
|
27
28
|
}
|
28
29
|
|
29
30
|
.modal-full {
|
30
|
-
|
31
|
-
|
32
|
-
|
31
|
+
.el-dialog__body {
|
32
|
+
padding: 0 !important;
|
33
|
+
}
|
33
34
|
}
|
34
35
|
|
35
36
|
.bt-Icon {
|
36
|
-
|
37
|
+
cursor: pointer;
|
37
38
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
&:hover {
|
40
|
+
opacity: 0.85;
|
41
|
+
background-color: #e8f9ff;
|
42
|
+
}
|
42
43
|
|
43
|
-
|
44
|
-
|
45
|
-
|
44
|
+
&.active {
|
45
|
+
background-color: #deffe4;
|
46
|
+
}
|
46
47
|
}
|
47
48
|
|
48
49
|
.icon-out {
|
49
|
-
|
50
|
+
fill: @iconOutColor;
|
50
51
|
}
|
51
52
|
|
52
53
|
.icon-in {
|
53
|
-
|
54
|
+
fill: @iconInColor;
|
54
55
|
}
|
55
56
|
|
56
57
|
.icon-middle {
|
57
|
-
|
58
|
+
fill: @iconMiddleColor;
|
58
59
|
}
|
59
60
|
|
60
|
-
.gray{
|
61
|
-
|
62
|
-
|
63
|
-
|
61
|
+
.gray {
|
62
|
+
.icon-out {
|
63
|
+
fill: #666;
|
64
|
+
}
|
64
65
|
|
65
|
-
|
66
|
-
|
67
|
-
|
66
|
+
.icon-in {
|
67
|
+
fill: #aaa;
|
68
|
+
}
|
68
69
|
|
69
|
-
|
70
|
-
|
71
|
-
|
70
|
+
.icon-middle {
|
71
|
+
fill: #777;
|
72
|
+
}
|
72
73
|
}
|
73
74
|
|
74
|
-
.active{
|
75
|
-
|
76
|
-
|
77
|
-
|
75
|
+
.active {
|
76
|
+
.icon-out {
|
77
|
+
fill: @activeIconOut;
|
78
|
+
}
|
78
79
|
|
79
|
-
|
80
|
-
|
81
|
-
|
80
|
+
.icon-in {
|
81
|
+
fill: @activeIconIn;
|
82
|
+
}
|
82
83
|
|
83
|
-
|
84
|
-
|
85
|
-
|
84
|
+
.icon-middle {
|
85
|
+
fill: @activeIconMiddle;
|
86
|
+
}
|
86
87
|
}
|
87
88
|
|
88
89
|
.icon-disable {
|
89
|
-
|
90
|
+
cursor: not-allowed;
|
90
91
|
}
|
91
92
|
|
92
93
|
.props-row {
|
93
|
-
|
94
|
+
margin-bottom: 0 !important;
|
94
95
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
96
|
+
.el-form-item__content,
|
97
|
+
.el-form-item__label {
|
98
|
+
color: #aaa;
|
99
|
+
}
|
99
100
|
}
|
100
101
|
|
101
102
|
.foreignObject {
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
103
|
+
> span {
|
104
|
+
/*解决span标签显示不完整的问题*/
|
105
|
+
position: relative;
|
106
|
+
bottom: 2px;
|
107
|
+
}
|
107
108
|
}
|
108
109
|
|
109
110
|
.tree-v {
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
}
|
111
|
+
--el-color-primary-light-9: @listActiveColor;
|
112
|
+
&.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
|
113
|
+
color: #fff;
|
114
|
+
}
|
115
|
+
}
|
@@ -1,23 +1,23 @@
|
|
1
1
|
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
|
2
|
-
<path d="M512.3 518.9m-469.2 0a469.2 469.2 0 1 0 938.4 0 469.2 469.2 0 1 0-938.4 0Z" fill="#
|
2
|
+
<path d="M512.3 518.9m-469.2 0a469.2 469.2 0 1 0 938.4 0 469.2 469.2 0 1 0-938.4 0Z" fill="#B4B4B4"/>
|
3
3
|
<path d="M512.3 518.9m-392.5 0a392.5 392.5 0 1 0 785 0 392.5 392.5 0 1 0-785 0Z" fill="#FFFFFF"/>
|
4
4
|
<path d="M512.3 523.8c-4.5 0-9-1.7-12.4-5.1L318.3 337.1c-6.8-6.8-6.8-17.9 0-24.8 6.8-6.8 17.9-6.8 24.8 0L524.7 494c6.8 6.8 6.8 17.9 0 24.8-3.5 3.3-7.9 5-12.4 5z"
|
5
|
-
fill="#
|
5
|
+
fill="#545454">
|
6
6
|
<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="45 512 512"
|
7
7
|
to="405 512 512" dur="3600s" repeatCount="indefinite"/>
|
8
8
|
</path>
|
9
9
|
<path d="M512.3 523.8c-4.5 0-9-1.7-12.4-5.1-6.8-6.8-6.8-17.9 0-24.8l130.8-130.8c6.8-6.8 17.9-6.8 24.8 0 6.8 6.8 6.8 17.9 0 24.8L524.7 518.7c-3.5 3.4-7.9 5.1-12.4 5.1z"
|
10
|
-
fill="#
|
10
|
+
fill="#292929">
|
11
11
|
<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="-45 512 512"
|
12
12
|
to="315 512 512" dur="43200s" repeatCount="indefinite"/>
|
13
13
|
</path>
|
14
|
-
<path d="M512.3 506.3m-47.5 0a47.5 47.5 0 1 0 95 0 47.5 47.5 0 1 0-95 0Z" fill="#
|
14
|
+
<path d="M512.3 506.3m-47.5 0a47.5 47.5 0 1 0 95 0 47.5 47.5 0 1 0-95 0Z" fill="#919191"/>
|
15
15
|
<path d="M512.3 218.8c-9 0-16.3-7.3-16.3-16.3v-29.1c0-9 7.3-16.3 16.3-16.3s16.3 7.3 16.3 16.3v29.1c0 9-7.4 16.3-16.3 16.3zM512.3 880.8c-9 0-16.3-7.3-16.3-16.3v-29.1c0-9 7.3-16.3 16.3-16.3s16.3 7.3 16.3 16.3v29.1c0 9-7.4 16.3-16.3 16.3zM812.4 518.9c0-9 7.3-16.3 16.3-16.3h29.1c9 0 16.3 7.3 16.3 16.3s-7.3 16.3-16.3 16.3h-29.1c-8.9 0-16.3-7.3-16.3-16.3zM150.4 518.9c0-9 7.3-16.3 16.3-16.3h29.1c9 0 16.3 7.3 16.3 16.3s-7.3 16.3-16.3 16.3h-29.1c-8.9 0-16.3-7.3-16.3-16.3z"
|
16
|
-
fill="#
|
16
|
+
fill="#323232"/>
|
17
17
|
<path d="M296.9 733.5c-2.2 0-4.5-0.9-6.2-2.6-3.4-3.4-3.4-9 0-12.4L540 469.2c3.4-3.4 9-3.4 12.4 0 3.4 3.4 3.4 9 0 12.4L303.1 731c-1.7 1.7-4 2.5-6.2 2.5z"
|
18
|
-
fill="#
|
18
|
+
fill="#919191">
|
19
19
|
<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="135 512 512"
|
20
20
|
to="495 512 512" dur="60s" repeatCount="indefinite"/>
|
21
21
|
</path>
|
22
|
-
<path d="M512.3 506.3m-22.8 0a22.8 22.8 0 1 0 45.6 0 22.8 22.8 0 1 0-45.6 0Z" fill="#
|
22
|
+
<path d="M512.3 506.3m-22.8 0a22.8 22.8 0 1 0 45.6 0 22.8 22.8 0 1 0-45.6 0Z" fill="#FFFFFF"/>
|
23
23
|
</svg>
|
@@ -1 +1 @@
|
|
1
|
-
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723451107100" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14149" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M928 96v832h-832V416.96h64v203.776h204.8V384h23.296v-19.2L620.8 364.736V160H416v-64h512z m-563.2 563.136H160V864h204.8v-204.864z m38.4 0V864h217.536v-204.864H403.2z m460.8 0h-204.864V864H864v-204.864z m-460.8-256v217.6h217.536v-217.6H403.2z m460.8 0h-204.864v217.6H864v-217.6z m0-38.4V160h-204.864v204.736H864z" fill="#324558" p-id="14150"></path><path d="M415.936 353.024v49.92l207.36 0.064v217.984H400.64V417.024h-48.768v-64h64z m-128 0v64h-64v-64h64z m-128 0v64h-64v-64h64z m0-128.512v64h-64v-64h64z m256 0v64h-64v-64h64z m-256-128.448v64h-64v-64h64z m128 0v64h-64v-64h64z m128 0v64h-64v-64h64z" fill="#41A368" p-id="14151"></path></svg>
|
@@ -1 +1 @@
|
|
1
|
-
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723451740830" class="icon" viewBox="0 0 1979 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8647" xmlns:xlink="http://www.w3.org/1999/xlink" width="92.765625" height="48"><path d="M409.6 320.853333c34.133333 0 61.44 6.826667 75.093333 27.306667 20.48 13.653333 27.306667 34.133333 27.306667 61.44 0 20.48-6.826667 34.133333-13.653333 47.786667-6.826667 13.653333-20.48 20.48-34.133334 27.306666 20.48 6.826667 40.96 13.653333 47.786667 27.306667s20.48 34.133333 20.48 54.613333c0 34.133333-13.653333 61.44-34.133333 75.093334-20.48 13.653333-47.786667 20.48-81.92 20.48H252.586667v-341.333334H409.6zM307.2 464.213333h88.746667c27.306667 0 40.96-6.826667 54.613333-13.653333 13.653333-6.826667 13.653333-20.48 13.653333-40.96s-6.826667-27.306667-13.653333-34.133333c-13.653333-6.826667-27.306667-13.653333-47.786667-13.653334H307.2v102.4z m0 157.013334h95.573333c20.48 0 40.96-6.826667 54.613334-13.653334 13.653333-6.826667 20.48-20.48 20.48-40.96s-6.826667-34.133333-20.48-40.96c-13.653333-6.826667-27.306667-13.653333-54.613334-13.653333H307.2v109.226667zM628.053333 416.426667v150.186666c0 20.48 6.826667 34.133333 13.653334 47.786667 6.826667 6.826667 20.48 13.653333 40.96 13.653333 13.653333 0 27.306667-6.826667 34.133333-13.653333 13.653333-13.653333 20.48-27.306667 27.306667-40.96V423.253333h47.786666v245.76h-47.786666v-34.133333c-20.48 27.306667-47.786667 40.96-75.093334 40.96-61.44 0-88.746667-34.133333-88.746666-102.4V416.426667h47.786666zM928.426667 416.426667h54.613333v40.96h-54.613333v143.36c0 6.826667 0 13.653333 6.826666 13.653333 0 0 6.826667 6.826667 13.653334 6.826667h34.133333v40.96h-40.96c-20.48 0-34.133333-6.826667-47.786667-13.653334-6.826667-13.653333-13.653333-27.306667-13.653333-47.786666V457.386667h-47.786667v-40.96h47.786667v-61.44l47.786667-20.48v81.92zM1099.093333 416.426667h54.613334v40.96h-54.613334v143.36c0 6.826667 0 13.653333 6.826667 13.653333 0 0 6.826667 6.826667 13.653333 6.826667h34.133334v40.96h-40.96c-20.48 0-34.133333-6.826667-47.786667-13.653334-6.826667-13.653333-13.653333-27.306667-13.653333-47.786666V457.386667h-47.786667v-40.96h47.786667v-61.44l47.786666-20.48v81.92zM1399.466667 443.733333c20.48 27.306667 34.133333 54.613333 34.133333 95.573334 0 34.133333-13.653333 68.266667-34.133333 95.573333-20.48 27.306667-54.613333 40.96-88.746667 40.96s-68.266667-13.653333-88.746667-40.96c-20.48-27.306667-34.133333-54.613333-34.133333-95.573333 0-40.96 13.653333-68.266667 34.133333-95.573334 20.48-27.306667 54.613333-34.133333 88.746667-34.133333 40.96 0 68.266667 13.653333 88.746667 34.133333z m-143.36 34.133334c-13.653333 13.653333-13.653333 34.133333-13.653334 61.44s6.826667 47.786667 13.653334 61.44c13.653333 20.48 34.133333 27.306667 54.613333 27.306666 20.48 0 40.96-6.826667 54.613333-27.306666 13.653333-13.653333 20.48-34.133333 20.48-61.44s-6.826667-47.786667-20.48-61.44c-13.653333-20.48-34.133333-27.306667-54.613333-27.306667-20.48 0-40.96 6.826667-54.613333 27.306667zM1699.84 512v150.186667h-47.786667V512c0-40.96-20.48-61.44-54.613333-61.44-13.653333 0-27.306667 6.826667-40.96 13.653333-13.653333 13.653333-20.48 27.306667-20.48 47.786667v150.186667h-47.786667V416.426667h47.786667v27.306666c6.826667-13.653333 20.48-20.48 34.133333-27.306666 13.653333-6.826667 27.306667-6.826667 40.96-6.826667 54.613333 0 88.746667 34.133333 88.746667 102.4z" fill="#515151" p-id="8648" data-spm-anchor-id="a313x.search_index.0.i1.117f3a81AAHUyn" class=""></path><path d="M1877.333333 1024h-1774.933333C47.786667 1024 0 976.213333 0 921.6v-819.2C0 47.786667 47.786667 0 102.4 0h1774.933333c54.613333 0 102.4 47.786667 102.4 102.4v819.2c0 54.613333-47.786667 102.4-102.4 102.4zM102.4 68.266667c-20.48 0-34.133333 13.653333-34.133333 34.133333v819.2c0 20.48 13.653333 34.133333 34.133333 34.133333h1774.933333c20.48 0 34.133333-13.653333 34.133334-34.133333v-819.2c0-20.48-13.653333-34.133333-34.133334-34.133333h-1774.933333z" fill="#bfbfbf" p-id="8649" data-spm-anchor-id="a313x.search_index.0.i2.117f3a81AAHUyn" class=""></path></svg>
|
@@ -1,13 +1 @@
|
|
1
|
-
|
2
|
-
xmlns="http://www.w3.org/2000/svg" p-id="4650" xmlns:xlink="http://www.w3.org/1999/xlink"
|
3
|
-
width="200" height="200">
|
4
|
-
<path
|
5
|
-
d="M767.1 292.6c-0.2-19-15.6-34.4-34.6-34.6l-202.2-2.5c-9.5-0.1-18.6 3.6-25.2 10.3l-35.4 35.4c48.4 138.5 72.4 282.3 42.1 433.8-1.7 10.4-3.9 21.1-6.4 31.9 6-1.5 11.7-4.4 16.3-9.1l237.6-237.6c6.7-6.7 10.4-15.8 10.3-25.2l-2.5-202.4zM664.3 429c-17.1 17.1-44.9 17.1-62 0s-17.1-44.9 0-62 44.9-17.1 62 0 17.2 44.8 0 62z"
|
6
|
-
fill="#FFDE55"></path>
|
7
|
-
<path
|
8
|
-
d="M779.6 292.5c-0.2-12.5-5.1-24.2-13.9-33.1-8.8-8.8-20.6-13.8-33.1-13.9L530.4 243c-12.7-0.1-25.2 4.9-34.2 13.9L258.6 494.6c-9 9-13.9 20.9-13.9 33.6 0 12.7 4.9 24.7 13.9 33.6l204.7 204.7c9 9 20.9 13.9 33.6 13.9 12.7 0 24.7-4.9 33.6-13.9l237.6-237.6c9-9 14.1-21.5 13.9-34.2l-2.4-202.2z m-29.1 218.7L512.9 748.8c-4.3 4.3-9.9 6.6-16 6.6-6 0-11.7-2.3-16-6.6L276.3 544.2c-4.3-4.3-6.6-9.9-6.6-16s2.3-11.7 6.6-16l237.6-237.6c4.2-4.2 10-6.6 16-6.6h0.3l202.2 2.5c12.4 0.2 22.2 9.9 22.3 22.3l2.5 202.2c0 6-2.4 11.9-6.7 16.2z"
|
9
|
-
fill=""></path>
|
10
|
-
<path
|
11
|
-
d="M593.5 358.1c-22 22-22 57.7 0 79.7 10.6 10.6 24.8 16.5 39.8 16.5s29.2-5.9 39.8-16.5c22-22 22-57.7 0-79.7-21.9-22-57.6-22-79.6 0z m62 62c-5.9 5.9-13.8 9.2-22.2 9.2s-16.2-3.3-22.2-9.2c-12.2-12.2-12.2-32.1 0-44.3 6.1-6.1 14.1-9.2 22.2-9.2 8 0 16.1 3.1 22.2 9.2 12.2 12.2 12.2 32.1 0 44.3z"
|
12
|
-
fill=""></path>
|
13
|
-
</svg>
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723452525784" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18246" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M247.164 308.281c-33.742 0-61.116 27.385-61.116 61.116 0 33.761 27.374 61.156 61.116 61.156 33.76 0 61.116-27.395 61.116-61.156 0-33.731-27.355-61.116-61.116-61.116m0 81.488c-11.26 0-20.372-9.102-20.372-20.372 0-11.24 9.111-20.372 20.372-20.372s20.372 9.132 20.372 20.372c0 11.27-9.112 20.372-20.372 20.372m244.464 244.463c5.63 0 10.723-2.248 14.403-5.989l40.744-40.743a20.125 20.125 0 0 0 5.967-14.345c0-11.28-9.11-20.411-20.37-20.411-5.61 0-10.704 2.287-14.405 5.988l-40.743 40.744c-3.68 3.7-5.968 8.754-5.968 14.384-0.001 11.28 9.111 20.372 20.372 20.372m462.585-156.988L546.775 69.806a20.248 20.248 0 0 0-14.404-5.99H247.164c-33.742 0-61.116 27.386-61.116 61.117 0 11.271 9.11 20.372 20.37 20.372s20.373-9.102 20.373-20.372c0-11.24 9.111-20.372 20.372-20.372h276.773l387.067 387.107-46.712 46.692c-3.68 3.69-5.968 8.764-5.968 14.385 0 11.28 9.132 20.41 20.372 20.41 5.63 0 10.723-2.286 14.403-6.027l61.116-61.106a20.247 20.247 0 0 0 5.969-14.354c-0.001-5.659-2.29-10.733-5.97-14.424M389.768 695.348c0 11.28 9.111 20.372 20.372 20.372 5.63 0 10.723-2.248 14.403-5.989l20.372-20.372a20.127 20.127 0 0 0 5.969-14.344c0-11.28-9.112-20.411-20.372-20.411a20.245 20.245 0 0 0-14.404 5.988l-20.371 20.372c-3.681 3.702-5.97 8.793-5.97 14.384m34.776-503.311a20.247 20.247 0 0 0-14.403-5.989H124.932c-33.742 0-61.116 27.385-61.116 61.116v285.208c0 5.63 2.287 10.723 5.968 14.393l407.44 407.43c3.7 3.74 8.793 5.988 14.402 5.988 5.63 0 10.724-2.248 14.404-5.989l325.952-325.95c3.7-3.66 5.968-8.754 5.968-14.384s-2.287-10.682-5.968-14.384l-407.44-407.44z m67.085 718.988L104.56 523.947V247.164c0-11.24 9.11-20.37 20.37-20.37h276.773L788.772 613.86 491.628 911.025z m0-113.817c5.63 0 10.723-2.248 14.403-5.989l81.487-81.488a20.231 20.231 0 0 0 5.97-14.384c0-11.26-9.112-20.332-20.373-20.332-5.63 0-10.723 2.248-14.403 5.948l-81.488 81.488c-3.68 3.7-5.968 8.753-5.968 14.424-0.001 11.24 9.111 20.333 20.372 20.333" p-id="18247"></path></svg>
|
@@ -1,20 +1,14 @@
|
|
1
1
|
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32">
|
2
2
|
<path d="M565.096296 289.185185s-0.948148 0 0 0c-110.933333-20.859259-208.592593 40.77037-237.985185 148.859259-14.222222 53.096296-24.651852 101.451852 44.562963 221.866667 14.222222 25.6 11.377778 70.162963 8.533333 95.762963-1.896296 14.222222 64.474074 36.02963 89.125926 42.666667l95.762963-509.155556z"
|
3
|
-
fill="#
|
3
|
+
fill="#cccccc"/>
|
4
4
|
<path d="M732.918519 513.896296c11.377778-111.881481-56.888889-203.851852-166.874075-224.711111h-0.948148L469.333333 798.340741c25.6 2.844444 94.814815 6.637037 98.607408-7.585185 6.637037-25.6 20.859259-67.318519 42.666666-86.281482C719.644444 618.192593 727.22963 568.888889 732.918519 513.896296z"
|
5
|
-
fill="#
|
5
|
+
fill="#bbbbbb"/>
|
6
6
|
<path d="M467.437037 806.874074c-7.585185-0.948148-12.325926-7.585185-14.222222-14.222222l-38.874074-256c-0.948148-5.688889 0.948148-11.377778 4.74074-15.170371 3.792593-3.792593 9.481481-5.688889 15.170371-4.74074l167.822222 31.288889c5.688889 0.948148 10.42963 4.740741 12.325926 9.481481 1.896296 4.740741 1.896296 11.377778-0.948148 16.118519L486.4 798.340741c-3.792593 6.637037-11.377778 10.42963-18.962963 8.533333z m-14.222222-251.259259l27.496296 182.992592L572.681481 578.37037l-119.466666-22.755555z"
|
7
|
-
fill="#
|
7
|
+
fill="#666666"/>
|
8
8
|
<path d="M375.466667 709.214815l-25.6 137.481481c0 2.844444 1.896296 5.688889 7.585185 10.42963l65.422222 54.992593c5.688889 4.740741 15.17037 8.533333 23.703704 10.429629l36.029629-193.422222-107.14074-19.911111z"
|
9
9
|
fill="#2D4375"/>
|
10
10
|
<path d="M482.607407 729.125926l-36.029629 193.422222c9.481481 1.896296 18.014815 1.896296 25.6-0.948148l80.592592-27.496296c6.637037-1.896296 10.42963-4.740741 11.377778-6.637037L589.748148 749.037037l-107.140741-19.911111z"
|
11
11
|
fill="#1E2D4F"/>
|
12
|
-
<path d="M612.503704 217.125926c-3.792593 18.014815-20.859259 29.392593-38.874074 26.548148-18.014815-3.792593-30.340741-20.859259-26.548149-38.874074l18.962963-100.503704c3.792593-18.014815 20.859259-29.392593 38.874075-26.548148 18.014815 3.792593 30.340741 20.859259 26.548148 38.874074l-18.962963 100.503704z"
|
13
|
-
fill="#FDB813"/>
|
14
|
-
<path d="M382.103704 228.503704c10.42963 15.17037 6.637037 36.02963-8.533334 46.459259-15.17037 10.42963-36.02963 6.637037-46.459259-8.533333l-57.837037-84.385186c-10.42963-15.17037-6.637037-36.02963 8.533333-46.459259 15.17037-10.42963 36.02963-6.637037 46.45926 8.533334l57.837037 84.385185zM757.57037 298.666667c-15.17037 10.42963-18.962963 31.288889-8.533333 46.459259 10.42963 15.17037 31.288889 18.962963 46.459259 8.533333l84.385185-57.837037c15.17037-10.42963 18.962963-31.288889 8.533334-46.459259-10.42963-15.17037-31.288889-18.962963-46.459259-8.533333l-84.385186 57.837037z"
|
15
|
-
fill="#FDB813"/>
|
16
|
-
<path d="M252.207407 361.244444c18.014815 3.792593 30.340741 20.859259 26.548149 38.874075-3.792593 18.014815-20.859259 29.392593-38.874075 26.548148l-100.503703-18.962963c-18.014815-3.792593-30.340741-20.859259-26.548148-38.874074 3.792593-18.014815 20.859259-29.392593 38.874074-26.548149l100.503703 18.962963zM931.081481 488.296296c18.014815 3.792593 30.340741 20.859259 26.548149 38.874074-3.792593 18.014815-20.859259 29.392593-38.874074 26.548149l-100.503704-18.962963c-18.014815-3.792593-30.340741-20.859259-26.548148-38.874075 3.792593-18.014815 20.859259-29.392593 38.874074-26.548148l100.503703 18.962963z"
|
17
|
-
fill="#FDB813"/>
|
18
12
|
<path d="M593.540741 807.822222c1.896296-7.585185-3.792593-15.17037-11.377778-16.118518l-107.140741-19.911111-4.740741 27.496296 107.140741 19.911111c6.637037 0.948148 14.222222-3.792593 16.118519-11.377778z"
|
19
13
|
fill="#CEEFF6"/>
|
20
14
|
<path d="M366.933333 750.933333c-7.585185-1.896296-15.17037 3.792593-16.118518 11.377778-1.896296 7.585185 3.792593 15.17037 11.377778 16.118519l107.14074 19.911111 4.740741-27.496297-107.140741-19.911111zM356.503704 808.77037c-7.585185-1.896296-15.17037 3.792593-16.118519 11.377778-1.896296 7.585185 3.792593 15.17037 11.377778 16.118519l107.140741 19.911111 4.74074-27.496297-107.14074-19.911111z"
|
@@ -1 +1 @@
|
|
1
|
-
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723450288083" class="icon" viewBox="0 0 1580 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6093" data-spm-anchor-id="a313x.search_index.0.i26.9f9f3a81a77f69" xmlns:xlink="http://www.w3.org/1999/xlink" width="74.0625" height="48"><path d="M54.993477 66.732873m55.901883 0l1163.038674 0q55.901883 0 55.901883 55.901883l0 625.891456q0 55.901883-55.901883 55.901883l-1163.038674 0q-55.901883 0-55.901883-55.901883l0-625.891456q0-55.901883 55.901883-55.901883Z" fill="#e6e6e6" p-id="6094" data-spm-anchor-id="a313x.search_index.0.i18.9f9f3a81a77f69" class=""></path><path d="M1281.900053 860.190223H102.929342A102.999219 102.999219 0 0 1 0 757.330759V113.830209A103.069097 103.069097 0 0 1 102.929342 10.900867h1178.970711a102.999219 102.999219 0 0 1 102.859464 102.929342v643.50055a102.929342 102.929342 0 0 1-102.859464 102.859464zM102.929342 24.876338A89.023749 89.023749 0 0 0 13.975471 113.830209v643.50055a89.023749 89.023749 0 0 0 88.953871 88.883994h1178.970711a89.023749 89.023749 0 0 0 88.883993-88.883994V113.830209a89.023749 89.023749 0 0 0-88.883993-88.953871z" fill="#cdcdcd" p-id="6095" data-spm-anchor-id="a313x.search_index.0.i21.9f9f3a81a77f69" class=""></path><path d="M145.554528 854.390403m21.452347 0l155.896376 0q21.452348 0 21.452348 21.452348l0 0q0 21.452348-21.452348 21.452347l-155.896376 0q-21.452348 0-21.452347-21.452347l0 0q0-21.452348 21.452347-21.452348Z" fill="#707070" p-id="6096" data-spm-anchor-id="a313x.search_index.0.i23.9f9f3a81a77f69" class=""></path><path d="M262.45934 0m12.438169 0l835.034376 0q12.438169 0 12.438169 12.438169l0 0q0 12.438169-12.438169 12.438169l-835.034376 0q-12.438169 0-12.438169-12.438169l0 0q0-12.438169 12.438169-12.438169Z" fill="#8a8a8a" p-id="6097" data-spm-anchor-id="a313x.search_index.0.i24.9f9f3a81a77f69" class=""></path><path d="M1006.02426 853.202488m21.452348 0l155.896376 0q21.452348 0 21.452348 21.452348l0 0q0 21.452348-21.452348 21.452347l-155.896376 0q-21.452348 0-21.452348-21.452347l0 0q0-21.452348 21.452348-21.452348Z" fill="#707070" p-id="6098" data-spm-anchor-id="a313x.search_index.0.i25.9f9f3a81a77f69" class=""></path><path d="M1273.934034 832.379037H110.89536a83.852824 83.852824 0 0 1-83.852824-83.852825V122.634756a83.852824 83.852824 0 0 1 83.852824-83.852825h1163.038674a83.852824 83.852824 0 0 1 83.852825 83.852825v625.891456a83.852824 83.852824 0 0 1-83.852825 83.852825zM110.89536 94.683814a27.950941 27.950941 0 0 0-27.950941 27.950942v625.891456a27.950941 27.950941 0 0 0 27.950941 27.950942h1163.038674a27.950941 27.950941 0 0 0 27.950942-27.950942V122.634756a27.950941 27.950941 0 0 0-27.950942-27.950942z" fill="#8a8a8a" p-id="6099" data-spm-anchor-id="a313x.search_index.0.i22.9f9f3a81a77f69" class=""></path><path d="M258.126944 581.589214h-5.729943q-51.639364-3.354113-51.639364-56.530779v-59.954769q0.419264-34.938677 23.129404-44.931139c-13.975471-7.406999-20.613819-21.38247-20.963206-41.926412v-50.870713a83.852824 83.852824 0 0 1 1.397547-15.442895q6.219084-40.109601 54.224826-40.109601h57.369308a109.358058 109.358058 0 0 1 15.652527 0.978283q40.039724 6.987735 40.039724 54.574213v50.730959c0 20.33431-6.987735 34.309781-20.963206 41.926412 15.163386 6.428717 22.849895 21.452348 23.199281 44.931138v59.95477q-0.489141 55.901883-57.439185 56.530779zM237.583002 552.031094h100.62339c2.934849 0 4.75166-2.236075 5.310679-5.799821V440.995979c0-3.913132-1.746934-5.79982-5.310679-5.799821H237.583002a6.149207 6.149207 0 0 0-5.79982 5.799821v105.305172A6.149207 6.149207 0 0 0 237.583002 552.031094z m2.236076-144.506368H335.411297c3.563745 0 5.310679-1.886689 5.310679-5.79982V306.621828A6.149207 6.149207 0 0 0 335.411297 300.472621H239.469691c-3.284236 0-5.240802 2.37583-5.79982 6.288961v95.033201a6.149207 6.149207 0 0 0 5.79982 5.799821zM497.177371 581.589214h-5.79982q-51.569487-3.354113-51.639365-56.530779v-59.954769c0-23.199281 8.035896-38.153035 23.199282-44.931139-13.975471-7.406999-20.963206-21.38247-20.963206-41.926412v-50.870713a90.141786 90.141786 0 0 1 1.32767-15.442895q6.288962-40.109601 54.364581-40.109601h57.369307a107.681002 107.681002 0 0 1 15.58265 0.978283q40.179478 6.987735 40.109601 54.574213v50.730959c-0.349387 20.33431-6.987735 34.309781-20.963206 41.926412 15.163386 6.428717 22.849895 21.452348 23.199281 44.931138v59.95477q-0.489141 55.901883-57.439185 56.530779z m-20.963206-29.488243h100.623389c2.934849 0 4.681783-2.236075 5.310679-5.79982V440.995979c0-3.913132-1.746934-5.79982-5.310679-5.799821H476.284042a6.149207 6.149207 0 0 0-5.79982 5.799821v105.305172a6.149207 6.149207 0 0 0 5.79982 5.729943z m2.236075-144.506367h96.221116c3.563745 0 5.310679-1.886689 5.310679-5.799821V306.621828a6.219084 6.219084 0 0 0-5.310679-6.288962H478.520118c-3.284236 0-5.240802 2.37583-5.799821 6.288962V401.794783a6.149207 6.149207 0 0 0 5.799821 5.799821zM675.224868 439.528554v-46.887704h33.890517v46.887704z m0 127.106907v-46.887705h33.890517v46.887705zM828.815292 581.589214h-5.799821q-51.569487-3.354113-51.639364-56.530779v-59.954769c0-23.199281 8.035896-38.153035 23.199281-44.931139-13.975471-7.406999-20.963206-21.38247-20.963206-41.926412v-50.870713a90.141786 90.141786 0 0 1 1.32767-15.442895q6.288962-40.109601 54.294704-40.109601h57.439184a107.681002 107.681002 0 0 1 15.58265 0.978283q40.039724 6.987735 40.109601 54.574213v50.730959c-0.349387 20.33431-7.337122 34.309781-20.963206 41.926412 15.163386 6.428717 22.849895 21.452348 23.129404 44.931138v59.95477q-0.419264 55.901883-57.369307 56.530779z m-20.963207-29.488243H908.405597c3.004726 0 4.75166-2.236075 5.380557-5.79982V440.995979c0-3.913132-1.816811-5.79982-5.380557-5.799821h-100.483634a6.07933 6.07933 0 0 0-5.799821 5.799821v105.305172a6.149207 6.149207 0 0 0 5.799821 5.729943z m2.236076-144.506367h96.221116c3.563745 0 5.310679-1.886689 5.310679-5.799821V306.621828a6.219084 6.219084 0 0 0-5.310679-6.288962h-96.151239c-3.284236 0-5.240802 2.37583-5.79982 6.288962V401.794783a6.149207 6.149207 0 0 0 5.79982 5.799821zM1067.865718 581.589214H1062.135775q-51.569487-3.354113-51.639364-56.530779v-59.954769q0.419264-34.938677 23.199281-44.931139c-13.975471-7.406999-20.963206-21.38247-20.963206-41.926412v-50.870713a90.141786 90.141786 0 0 1 1.32767-15.442895q6.288962-40.109601 54.294704-40.109601h57.439185a107.681002 107.681002 0 0 1 15.582649 0.978283q40.039724 6.987735 40.039724 54.574213v50.730959c0 20.33431-6.987735 34.309781-20.963206 41.926412 15.163386 6.428717 22.849895 21.452348 23.129404 44.931138v59.95477q-0.419264 55.901883-57.369307 56.530779z m-20.963206-29.488243h100.553512c3.004726 0 4.75166-2.236075 5.380556-5.79982V440.995979c0-3.913132-1.816811-5.79982-5.380556-5.799821h-100.483634a6.07933 6.07933 0 0 0-5.799821 5.799821v105.305172a6.149207 6.149207 0 0 0 5.799821 5.729943z m2.166198-144.506367h96.221116c3.493868 0 5.310679-1.886689 5.310679-5.799821V306.621828a6.219084 6.219084 0 0 0-5.310679-6.288962h-96.151238c-3.214358 0-5.170924 2.37583-5.729943 6.288962V401.794783a6.149207 6.149207 0 0 0 5.729943 5.799821z" fill="#2c2c2c" p-id="6100" data-spm-anchor-id="a313x.search_index.0.i20.9f9f3a81a77f69" class=""></path></svg>
|
@@ -1 +1 @@
|
|
1
|
-
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723452454464" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17257" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M512 512V38.4A473.6 473.6 0 0 1 985.6 512z" fill="" p-id="17258"></path><path d="M916.096 576A409.344 409.344 0 1 1 448 107.904V43.232A473.344 473.344 0 1 0 980.768 576z" fill="" p-id="17259"></path></svg>
|
@@ -1 +1 @@
|
|
1
|
-
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723449816807" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10271" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#707070" opacity=".406" p-id="10272" data-spm-anchor-id="a313x.search_index.0.i5.26f43a81xezxDj" class="selected"></path><path d="M512 128a384 384 0 1 1-384 384 384 384 0 0 1 384-384z" fill="#707070" p-id="10273" data-spm-anchor-id="a313x.search_index.0.i6.26f43a81xezxDj" class="selected"></path><path d="M485.44 768v-363.648h-135.872v-48.64h326.848v48.64h-136.448v363.648z" fill="#FFFFFF" p-id="10274"></path></svg>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
//颜色
|
2
2
|
@listActiveColor: #6ab4ff;
|
3
|
-
@iconOutColor
|
4
|
-
@iconInColor
|
5
|
-
@iconMiddleColor
|
6
|
-
@activeIconOut
|
7
|
-
@activeIconIn
|
8
|
-
@activeIconMiddle
|
3
|
+
@iconOutColor: #5fadff;
|
4
|
+
@iconInColor: #9eefd9;
|
5
|
+
@iconMiddleColor: #33deb4;
|
6
|
+
@activeIconOut: #008fff;
|
7
|
+
@activeIconIn: #44fac9;
|
8
|
+
@activeIconMiddle: #00ffc0;
|
@@ -38,7 +38,6 @@
|
|
38
38
|
import type { IVisibleInfo } from '../config'
|
39
39
|
import { useContextMenuStore, useEditPrivateStore } from '@/stores/system'
|
40
40
|
import { EContextMenuInfoType } from '@/stores/system/types'
|
41
|
-
import ImportJson from '@/components/svg-editor/import-json.vue'
|
42
41
|
|
43
42
|
const globalStore = useGlobalStore(pinia)
|
44
43
|
const configStore = useConfigStore(pinia)
|
@@ -46,7 +45,9 @@
|
|
46
45
|
const editPrivateStore = useEditPrivateStore(pinia)
|
47
46
|
const contextMenuStore = useContextMenuStore(pinia)
|
48
47
|
|
49
|
-
|
48
|
+
const props = defineProps<{ vueComp?: Record<string, any> }>()
|
49
|
+
|
50
|
+
componentsRegister(props.vueComp)
|
50
51
|
const contextMenuRef = ref<HTMLElement>()
|
51
52
|
const canvasRef = ref<HTMLElement>()
|
52
53
|
const ct: Record<string, any> = {
|
@@ -36,11 +36,13 @@
|
|
36
36
|
|
37
37
|
setEditorLoadTime()
|
38
38
|
|
39
|
-
//todo 优化自带组件使用体验
|
40
39
|
const emits = defineEmits(['onReturn', 'onPreview', 'onSave'])
|
41
|
-
const props = withDefaults(
|
42
|
-
saveFile
|
43
|
-
|
40
|
+
const props = withDefaults(
|
41
|
+
defineProps<{ customToolbar?: IConfig; vueComp?: Record<string, any>; data?: string; saveFile?: boolean }>(),
|
42
|
+
{
|
43
|
+
saveFile: false
|
44
|
+
}
|
45
|
+
)
|
44
46
|
const globalStore = useGlobalStore(pinia)
|
45
47
|
const svgEditLayoutStore = useSvgEditLayoutStore(pinia)
|
46
48
|
const configStore = useConfigStore(pinia)
|
@@ -152,7 +154,7 @@
|
|
152
154
|
<el-main class="middle main">
|
153
155
|
<div class="canvas-main-pc">
|
154
156
|
<Vue3RulerTool class="canvas-main-pc" :visible="configStore.svg.ruler" @onLineMouseUp="onLineMouseUp">
|
155
|
-
<center-panel ref="centerRef" />
|
157
|
+
<center-panel ref="centerRef" :vueComp="props.vueComp" />
|
156
158
|
</Vue3RulerTool>
|
157
159
|
</div>
|
158
160
|
</el-main>
|
@@ -26,11 +26,14 @@
|
|
26
26
|
setEditorLoadTime()
|
27
27
|
|
28
28
|
const emit = defineEmits(['onMessage'])
|
29
|
-
const props = withDefaults(
|
30
|
-
canvasDrag
|
31
|
-
|
29
|
+
const props = withDefaults(
|
30
|
+
defineProps<{ vueComp?: Record<string, any>; data?: IDataModel; canvasDrag?: boolean }>(),
|
31
|
+
{
|
32
|
+
canvasDrag: true
|
33
|
+
}
|
34
|
+
)
|
32
35
|
const globalStore = useGlobalStore(pinia)
|
33
|
-
componentsRegister()
|
36
|
+
componentsRegister(props.vueComp)
|
34
37
|
const preview_data = reactive(
|
35
38
|
props.data ?? {
|
36
39
|
layout_center: {
|
package/src/utils/index.ts
CHANGED
@@ -18,10 +18,11 @@ export const preventDefault = (e: any) => {
|
|
18
18
|
e.preventDefault()
|
19
19
|
}
|
20
20
|
|
21
|
-
export function componentsRegister() {
|
21
|
+
export function componentsRegister(data?: Record<string, any>) {
|
22
22
|
//注册所有组件
|
23
23
|
const instance = getCurrentInstance()
|
24
|
-
|
24
|
+
const t = data ? Object.assign(vueComp, data) : vueComp
|
25
|
+
for (let key in t) {
|
25
26
|
if (!instance?.appContext?.components.hasOwnProperty(key) && vueComp.hasOwnProperty(key)) {
|
26
27
|
instance?.appContext?.app.component(key, vueComp[key])
|
27
28
|
}
|