@tmagic/editor 1.5.1 → 1.5.3
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/dist/{tmagic-editor.css → style.css} +366 -6
- package/dist/tmagic-editor.js +1422 -510
- package/dist/tmagic-editor.umd.cjs +1437 -524
- package/package.json +7 -7
- package/src/components/SplitView.vue +1 -1
- package/src/fields/DataSourceFieldSelect/Index.vue +6 -6
- package/src/fields/DisplayConds.vue +2 -1
- package/src/fields/StyleSetter/Index.vue +69 -0
- package/src/fields/StyleSetter/components/BackgroundPosition.vue +71 -0
- package/src/fields/StyleSetter/components/Border.vue +104 -0
- package/src/fields/StyleSetter/components/Box.vue +73 -0
- package/src/fields/StyleSetter/components/Position.vue +54 -0
- package/src/fields/StyleSetter/icons/background-position/LeftBottom.vue +7 -0
- package/src/fields/StyleSetter/icons/background-position/LeftCenter.vue +7 -0
- package/src/fields/StyleSetter/icons/background-position/LeftTop.vue +12 -0
- package/src/fields/StyleSetter/icons/background-position/index.ts +3 -0
- package/src/fields/StyleSetter/icons/background-repeat/NoRepeat.vue +8 -0
- package/src/fields/StyleSetter/icons/background-repeat/Repeat.vue +31 -0
- package/src/fields/StyleSetter/icons/background-repeat/RepeatX.vue +8 -0
- package/src/fields/StyleSetter/icons/background-repeat/RepeatY.vue +8 -0
- package/src/fields/StyleSetter/icons/background-repeat/index.ts +4 -0
- package/src/fields/StyleSetter/icons/display/Block.vue +7 -0
- package/src/fields/StyleSetter/icons/display/Flex.vue +7 -0
- package/src/fields/StyleSetter/icons/display/Inline.vue +7 -0
- package/src/fields/StyleSetter/icons/display/InlineBlock.vue +7 -0
- package/src/fields/StyleSetter/icons/display/None.vue +7 -0
- package/src/fields/StyleSetter/icons/display/index.ts +5 -0
- package/src/fields/StyleSetter/icons/flex-direction/Column.vue +7 -0
- package/src/fields/StyleSetter/icons/flex-direction/ColumnReverse.vue +7 -0
- package/src/fields/StyleSetter/icons/flex-direction/Row.vue +7 -0
- package/src/fields/StyleSetter/icons/flex-direction/RowReverse.vue +7 -0
- package/src/fields/StyleSetter/icons/flex-direction/index.ts +4 -0
- package/src/fields/StyleSetter/icons/justify-content/Center.vue +5 -0
- package/src/fields/StyleSetter/icons/justify-content/FlexEnd.vue +5 -0
- package/src/fields/StyleSetter/icons/justify-content/FlexStart.vue +5 -0
- package/src/fields/StyleSetter/icons/justify-content/SpaceAround.vue +7 -0
- package/src/fields/StyleSetter/icons/justify-content/SpaceBetween.vue +5 -0
- package/src/fields/StyleSetter/icons/justify-content/index.ts +5 -0
- package/src/fields/StyleSetter/icons/text-align/Center.vue +7 -0
- package/src/fields/StyleSetter/icons/text-align/Left.vue +7 -0
- package/src/fields/StyleSetter/icons/text-align/Right.vue +7 -0
- package/src/fields/StyleSetter/icons/text-align/index.ts +3 -0
- package/src/fields/StyleSetter/pro/Background.vue +78 -0
- package/src/fields/StyleSetter/pro/Border.vue +35 -0
- package/src/fields/StyleSetter/pro/Font.vue +90 -0
- package/src/fields/StyleSetter/pro/Layout.vue +164 -0
- package/src/fields/StyleSetter/pro/Position.vue +48 -0
- package/src/fields/StyleSetter/pro/index.ts +5 -0
- package/src/index.ts +3 -0
- package/src/layouts/props-panel/FormPanel.vue +1 -1
- package/src/layouts/props-panel/PropsPanel.vue +32 -2
- package/src/services/editor.ts +2 -2
- package/src/theme/props-panel.scss +13 -0
- package/src/theme/resizer.scss +2 -2
- package/src/theme/style-setter/background.scss +113 -0
- package/src/theme/style-setter/border.scss +53 -0
- package/src/theme/style-setter/index.scss +28 -0
- package/src/theme/style-setter/layout.scss +199 -0
- package/src/theme/theme.scss +1 -0
- package/src/utils/props.ts +52 -297
- package/types/index.d.ts +425 -110
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
.background-position-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
.presets-value-list {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
width: 80px;
|
|
8
|
+
height: auto;
|
|
9
|
+
.el-button {
|
|
10
|
+
& + .el-button {
|
|
11
|
+
margin-left: 2px;
|
|
12
|
+
}
|
|
13
|
+
&:nth-child(3n + 1) {
|
|
14
|
+
margin-left: 0 !important;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.position-icon {
|
|
19
|
+
position: relative;
|
|
20
|
+
width: 14px;
|
|
21
|
+
height: 14px;
|
|
22
|
+
border: 1px solid #1d1f24;
|
|
23
|
+
&.active {
|
|
24
|
+
background-color: var(--el-color-primary);
|
|
25
|
+
&::after {
|
|
26
|
+
border: 1px solid #fff;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
&::after {
|
|
30
|
+
position: absolute;
|
|
31
|
+
content: "";
|
|
32
|
+
border: 1px solid #1d1f24;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
}
|
|
35
|
+
&.left-top {
|
|
36
|
+
&::after {
|
|
37
|
+
top: 1px;
|
|
38
|
+
left: 1px;
|
|
39
|
+
width: 6px;
|
|
40
|
+
height: 6px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
&.center-top {
|
|
44
|
+
&::after {
|
|
45
|
+
top: 1px;
|
|
46
|
+
left: 1px;
|
|
47
|
+
width: 12px;
|
|
48
|
+
height: 6px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
&.right-top {
|
|
52
|
+
&::after {
|
|
53
|
+
top: 1px;
|
|
54
|
+
right: 1px;
|
|
55
|
+
width: 6px;
|
|
56
|
+
height: 6px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
&.left-center {
|
|
60
|
+
&::after {
|
|
61
|
+
top: 1px;
|
|
62
|
+
left: 1px;
|
|
63
|
+
width: 6px;
|
|
64
|
+
height: 12px;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
&.center-center {
|
|
68
|
+
&::after {
|
|
69
|
+
top: 1px;
|
|
70
|
+
left: 1px;
|
|
71
|
+
width: 12px;
|
|
72
|
+
height: 12px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
&.right-center {
|
|
76
|
+
&::after {
|
|
77
|
+
top: 1px;
|
|
78
|
+
right: 1px;
|
|
79
|
+
width: 6px;
|
|
80
|
+
height: 12px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
&.left-bottom {
|
|
84
|
+
&::after {
|
|
85
|
+
bottom: 1px;
|
|
86
|
+
left: 1px;
|
|
87
|
+
width: 6px;
|
|
88
|
+
height: 6px;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
&.center-bottom {
|
|
92
|
+
&::after {
|
|
93
|
+
bottom: 1px;
|
|
94
|
+
left: 1px;
|
|
95
|
+
width: 12px;
|
|
96
|
+
height: 6px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
&.right-bottom {
|
|
100
|
+
&::after {
|
|
101
|
+
bottom: 1px;
|
|
102
|
+
right: 1px;
|
|
103
|
+
width: 6px;
|
|
104
|
+
height: 6px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
.custom-value {
|
|
110
|
+
position: relative;
|
|
111
|
+
flex: 1;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.border-box-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
.border-icon-container {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
width: 88px;
|
|
8
|
+
&-row {
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
& + .border-icon-container-row {
|
|
13
|
+
margin-top: 8px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.border-icon {
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
width: 16px;
|
|
19
|
+
height: 16px;
|
|
20
|
+
border-width: 1px;
|
|
21
|
+
border-color: #111;
|
|
22
|
+
border-style: solid;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
& + .border-icon {
|
|
25
|
+
margin-left: 8px;
|
|
26
|
+
}
|
|
27
|
+
&.active {
|
|
28
|
+
border-width: 1px;
|
|
29
|
+
border-color: var(--el-color-primary);
|
|
30
|
+
}
|
|
31
|
+
&.border-icon-top {
|
|
32
|
+
border-top-width: 2px;
|
|
33
|
+
border-style: solid dashed dashed dashed;
|
|
34
|
+
}
|
|
35
|
+
&.border-icon-right {
|
|
36
|
+
border-right-width: 2px;
|
|
37
|
+
border-style: dashed solid dashed dashed;
|
|
38
|
+
}
|
|
39
|
+
&.border-icon-bottom {
|
|
40
|
+
border-bottom-width: 2px;
|
|
41
|
+
border-style: dashed dashed solid dashed;
|
|
42
|
+
}
|
|
43
|
+
&.border-icon-left {
|
|
44
|
+
border-left-width: 2px;
|
|
45
|
+
border-style: dashed dashed dashed solid;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
.border-value-container {
|
|
50
|
+
margin-left: 16px;
|
|
51
|
+
flex: 1;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@use "./border.scss";
|
|
2
|
+
@use "./layout.scss";
|
|
3
|
+
@use "./background.scss";
|
|
4
|
+
|
|
5
|
+
.m-fields-style-setter {
|
|
6
|
+
width: 100%;
|
|
7
|
+
|
|
8
|
+
.tmagic-design-collapse-item {
|
|
9
|
+
> .el-collapse-item__header {
|
|
10
|
+
background-color: #f2f3f7;
|
|
11
|
+
height: 36px;
|
|
12
|
+
padding: 10px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.el-collapse-item__wrap {
|
|
16
|
+
padding: 0 10px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.text-align-list {
|
|
22
|
+
display: flex;
|
|
23
|
+
height: 100%;
|
|
24
|
+
|
|
25
|
+
.btn-active {
|
|
26
|
+
color: var(--el-color-primary) !important;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
// 盒子模型
|
|
2
|
+
.layout-box-container {
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 150px;
|
|
6
|
+
|
|
7
|
+
.help-txt {
|
|
8
|
+
float: left;
|
|
9
|
+
margin-left: -10px;
|
|
10
|
+
transform: scale(0.75);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.outer-top-border,
|
|
14
|
+
.inner-top-border,
|
|
15
|
+
.outer-right-border,
|
|
16
|
+
.inner-right-border,
|
|
17
|
+
.outer-bottom-border,
|
|
18
|
+
.inner-bottom-border,
|
|
19
|
+
.outer-left-border,
|
|
20
|
+
.inner-left-border {
|
|
21
|
+
position: absolute;
|
|
22
|
+
transition: all 0.3s ease;
|
|
23
|
+
.next-input {
|
|
24
|
+
position: absolute;
|
|
25
|
+
height: 20px;
|
|
26
|
+
input {
|
|
27
|
+
padding: 0;
|
|
28
|
+
width: 100%;
|
|
29
|
+
border: none;
|
|
30
|
+
outline: none;
|
|
31
|
+
margin: 0;
|
|
32
|
+
font-weight: 400;
|
|
33
|
+
vertical-align: top;
|
|
34
|
+
background-color: transparent;
|
|
35
|
+
color: #333;
|
|
36
|
+
text-align: center;
|
|
37
|
+
line-height: 20px;
|
|
38
|
+
height: 20px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// top
|
|
44
|
+
.outer-top-border,
|
|
45
|
+
.inner-top-border {
|
|
46
|
+
height: 0;
|
|
47
|
+
border-left: 20px solid transparent;
|
|
48
|
+
border-right: 20px solid transparent;
|
|
49
|
+
border-top: 20px solid #d6e4ff;
|
|
50
|
+
.next-input {
|
|
51
|
+
left: 0;
|
|
52
|
+
right: 0;
|
|
53
|
+
top: -20px;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.outer-top-border {
|
|
58
|
+
top: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
right: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.inner-top-border {
|
|
64
|
+
top: 25px;
|
|
65
|
+
left: 25px;
|
|
66
|
+
right: 25px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.outer-top-border,
|
|
70
|
+
.inner-top-border {
|
|
71
|
+
&:hover {
|
|
72
|
+
border-top: 20px solid #bfd4fb;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// right
|
|
77
|
+
.outer-right-border,
|
|
78
|
+
.inner-right-border {
|
|
79
|
+
width: 0;
|
|
80
|
+
border-top: 20px solid transparent;
|
|
81
|
+
border-bottom: 20px solid transparent;
|
|
82
|
+
border-right: 20px solid #d6e4ff;
|
|
83
|
+
|
|
84
|
+
.next-input {
|
|
85
|
+
top: 0;
|
|
86
|
+
bottom: 0;
|
|
87
|
+
right: -20px;
|
|
88
|
+
width: 20px;
|
|
89
|
+
margin: auto;
|
|
90
|
+
input {
|
|
91
|
+
position: absolute;
|
|
92
|
+
top: 0;
|
|
93
|
+
bottom: 0;
|
|
94
|
+
left: 0;
|
|
95
|
+
margin: auto;
|
|
96
|
+
width: 20px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.outer-right-border {
|
|
102
|
+
top: 5px;
|
|
103
|
+
bottom: 5px;
|
|
104
|
+
right: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.inner-right-border {
|
|
108
|
+
top: 30px;
|
|
109
|
+
bottom: 30px;
|
|
110
|
+
right: 25px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.outer-right-border,
|
|
114
|
+
.inner-right-border {
|
|
115
|
+
&:hover {
|
|
116
|
+
border-right: 20px solid #bfd4fb;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// bottom
|
|
121
|
+
.outer-bottom-border,
|
|
122
|
+
.inner-bottom-border {
|
|
123
|
+
height: 0;
|
|
124
|
+
border-left: 20px solid transparent;
|
|
125
|
+
border-right: 20px solid transparent;
|
|
126
|
+
border-bottom: 20px solid #d6e4ff;
|
|
127
|
+
|
|
128
|
+
.next-input {
|
|
129
|
+
position: absolute;
|
|
130
|
+
left: 0;
|
|
131
|
+
right: 0;
|
|
132
|
+
bottom: -20px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.outer-bottom-border {
|
|
137
|
+
bottom: 0;
|
|
138
|
+
left: 0;
|
|
139
|
+
right: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.inner-bottom-border {
|
|
143
|
+
bottom: 25px;
|
|
144
|
+
left: 25px;
|
|
145
|
+
right: 25px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.outer-bottom-border,
|
|
149
|
+
.inner-bottom-border {
|
|
150
|
+
&:hover {
|
|
151
|
+
border-bottom: 20px solid #bfd4fb;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// left
|
|
156
|
+
.outer-left-border,
|
|
157
|
+
.inner-left-border {
|
|
158
|
+
width: 0;
|
|
159
|
+
border-top: 20px solid transparent;
|
|
160
|
+
border-bottom: 20px solid transparent;
|
|
161
|
+
border-left: 20px solid #d6e4ff;
|
|
162
|
+
|
|
163
|
+
.next-input {
|
|
164
|
+
position: absolute;
|
|
165
|
+
top: 0;
|
|
166
|
+
bottom: 0;
|
|
167
|
+
left: -20px;
|
|
168
|
+
width: 20px;
|
|
169
|
+
margin: auto;
|
|
170
|
+
input {
|
|
171
|
+
position: absolute;
|
|
172
|
+
top: 0;
|
|
173
|
+
bottom: 0;
|
|
174
|
+
right: 0;
|
|
175
|
+
margin: auto;
|
|
176
|
+
width: 20px;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.outer-left-border {
|
|
182
|
+
top: 5px;
|
|
183
|
+
bottom: 5px;
|
|
184
|
+
left: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.inner-left-border {
|
|
188
|
+
top: 30px;
|
|
189
|
+
bottom: 30px;
|
|
190
|
+
left: 25px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.outer-left-border,
|
|
194
|
+
.inner-left-border {
|
|
195
|
+
&:hover {
|
|
196
|
+
border-left: 20px solid #bfd4fb;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
package/src/theme/theme.scss
CHANGED