@dhccmobile/vue3-lo-form 2.0.4 → 2.0.5
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/demo.html +10 -1
- package/dist/vue3-lo-form.common.js +6979 -8682
- package/dist/vue3-lo-form.common.js.map +1 -1
- package/dist/vue3-lo-form.css +1 -1
- package/dist/vue3-lo-form.umd.js +6988 -8692
- package/dist/vue3-lo-form.umd.js.map +1 -1
- package/dist/vue3-lo-form.umd.min.js +1 -1
- package/dist/vue3-lo-form.umd.min.js.map +1 -1
- package/package.json +8 -8
- package/src/App.vue +1 -9
- package/src/components/form/DvForm.vue +4 -3
- package/src/components/form/DvFormLayout.vue +39 -3
- package/src/main.ts +2 -0
- package/src/styles/theme-3.scss +371 -0
- package/src/styles/theme-4.scss +401 -0
- package/src/styles/themes.scss +10 -2
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
.ant-form-horizontal {
|
|
2
|
+
.lo-control-container {
|
|
3
|
+
/**非编辑状态下的样式*/
|
|
4
|
+
.is-disable-input {
|
|
5
|
+
:deep(.ant-form-item-control) {
|
|
6
|
+
border-radius: 5px;
|
|
7
|
+
border: rgba(229,229,229, 0.7) 1px solid;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
.lo-control-box {
|
|
11
|
+
.ant-form-item {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
height: 100%;
|
|
15
|
+
:deep {
|
|
16
|
+
.ant-form-item-control {
|
|
17
|
+
min-height: auto;
|
|
18
|
+
margin-top: 1px;
|
|
19
|
+
}
|
|
20
|
+
.ant-form-item-label {
|
|
21
|
+
min-width: auto !important;
|
|
22
|
+
width: 100% !important;
|
|
23
|
+
position: relative;
|
|
24
|
+
background-color: transparent;
|
|
25
|
+
z-index: 1;
|
|
26
|
+
label {
|
|
27
|
+
display: block;
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: auto;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
white-space: pre-wrap;
|
|
32
|
+
word-break: break-all;
|
|
33
|
+
line-height: normal;
|
|
34
|
+
padding: 3px 0;
|
|
35
|
+
text-align: left;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.ant-input,
|
|
39
|
+
.ant-input-affix-wrapper,
|
|
40
|
+
.ant-select-selector,
|
|
41
|
+
.ant-picker,
|
|
42
|
+
.ant-btn,
|
|
43
|
+
.ant-input-number {
|
|
44
|
+
border-radius: .5rem;
|
|
45
|
+
min-height: 40px;
|
|
46
|
+
max-height: 40px;
|
|
47
|
+
padding: 0 6px;
|
|
48
|
+
height: 100%;
|
|
49
|
+
color: #333333;
|
|
50
|
+
border: none;
|
|
51
|
+
background: #f2f3f5;
|
|
52
|
+
}
|
|
53
|
+
.ant-input-number-input, input[type=search] {
|
|
54
|
+
min-height: 40px;
|
|
55
|
+
padding: 0;
|
|
56
|
+
height: 100%;
|
|
57
|
+
color: #333333;
|
|
58
|
+
}
|
|
59
|
+
.ant-input-number-group,
|
|
60
|
+
.ant-input-number-group-wrapper,
|
|
61
|
+
.ant-input-number-input-wrap {
|
|
62
|
+
width: 100%;
|
|
63
|
+
height: 100%;
|
|
64
|
+
}
|
|
65
|
+
.ant-picker-input > input {
|
|
66
|
+
color: #333333;
|
|
67
|
+
}
|
|
68
|
+
.ant-radio-group {
|
|
69
|
+
padding: 0 6px;
|
|
70
|
+
margin: auto 0;
|
|
71
|
+
}
|
|
72
|
+
.ant-checkbox-group {
|
|
73
|
+
padding: 8px 6px;
|
|
74
|
+
}
|
|
75
|
+
.ant-picker-suffix, .ant-select-arrow {
|
|
76
|
+
width: 40px;
|
|
77
|
+
}
|
|
78
|
+
.ant-picker-suffix {
|
|
79
|
+
text-align: center;
|
|
80
|
+
margin-right: -6px;
|
|
81
|
+
}
|
|
82
|
+
.ant-select-arrow {
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
height: 100%;
|
|
87
|
+
top: 5px;
|
|
88
|
+
right: 0;
|
|
89
|
+
z-index: 10;
|
|
90
|
+
}
|
|
91
|
+
.ant-form-item-control-input-content {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center !important;
|
|
94
|
+
min-height: 40px;
|
|
95
|
+
border-radius: .5rem;
|
|
96
|
+
background: #f2f3f5;
|
|
97
|
+
}
|
|
98
|
+
.ant-form-item-control-input, .ant-form-item-control-input-content {
|
|
99
|
+
height: 100%;
|
|
100
|
+
align-items: center;
|
|
101
|
+
}
|
|
102
|
+
.ant-input:focus,
|
|
103
|
+
.ant-input-number-focused,
|
|
104
|
+
.ant-picker-focused,
|
|
105
|
+
.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
106
|
+
box-shadow: 0 0 0 1px #e1e2e4;
|
|
107
|
+
z-index: 10;
|
|
108
|
+
}
|
|
109
|
+
.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector,
|
|
110
|
+
.ant-picker-input > input[disabled],
|
|
111
|
+
.ant-input-number-disabled,
|
|
112
|
+
.ant-input[disabled] {
|
|
113
|
+
color: #666666;
|
|
114
|
+
background-color: #ebebeb;
|
|
115
|
+
}
|
|
116
|
+
.ant-picker-disabled {
|
|
117
|
+
background-color: #ebebeb;
|
|
118
|
+
}
|
|
119
|
+
.ant-form-item-explain-error {
|
|
120
|
+
line-height: 24px;
|
|
121
|
+
color: #ff2d4b;
|
|
122
|
+
font-size: 12px;
|
|
123
|
+
padding: 0 6px;
|
|
124
|
+
background: rgba(255, 45, 75, 0.2)
|
|
125
|
+
}
|
|
126
|
+
.ant-select-selection-item {
|
|
127
|
+
display: inline-flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
}
|
|
130
|
+
.ant-select-selection-overflow {
|
|
131
|
+
padding-right: 40px;
|
|
132
|
+
}
|
|
133
|
+
.ant-select-multiple {
|
|
134
|
+
.ant-select-selection-search {
|
|
135
|
+
margin-start: 0;
|
|
136
|
+
margin-inline-start: 0;
|
|
137
|
+
}
|
|
138
|
+
.ant-select-selection-placeholder {
|
|
139
|
+
left: 6px;
|
|
140
|
+
right: 40px;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
.ant-select-single {
|
|
144
|
+
.ant-select-selection-item,
|
|
145
|
+
.ant-select-selection-search {
|
|
146
|
+
position: absolute;
|
|
147
|
+
left: 6px;
|
|
148
|
+
right: 40px;
|
|
149
|
+
top: 0;
|
|
150
|
+
bottom: 0;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
:deep .ant-form-item-has-error {
|
|
156
|
+
.ant-input:focus,
|
|
157
|
+
.ant-input-number-focused,
|
|
158
|
+
.ant-picker-focused,
|
|
159
|
+
.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
160
|
+
box-shadow: 0 0 0 1px #ff194c;
|
|
161
|
+
color: #ff194c;
|
|
162
|
+
z-index: 10;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
.lo-control-container {
|
|
169
|
+
box-sizing: border-box;
|
|
170
|
+
margin-bottom: 0;
|
|
171
|
+
.lo-control-box {
|
|
172
|
+
height: 100%;
|
|
173
|
+
.ant-form-item {
|
|
174
|
+
margin-bottom: 0;
|
|
175
|
+
.lo-select {
|
|
176
|
+
:deep {
|
|
177
|
+
.ant-select-selection-selected-value {
|
|
178
|
+
width: 100%;
|
|
179
|
+
white-space: nowrap;
|
|
180
|
+
text-overflow: ellipsis;
|
|
181
|
+
overflow: hidden;
|
|
182
|
+
word-break: break-all;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
&.lo-select-multiple-suffix-icon {
|
|
186
|
+
:deep {
|
|
187
|
+
.ant-select-arrow {
|
|
188
|
+
margin: 0;
|
|
189
|
+
height: 100%;
|
|
190
|
+
top: 0;
|
|
191
|
+
right: 0;
|
|
192
|
+
width: fit-content;
|
|
193
|
+
.ant-select-arrow-icon {
|
|
194
|
+
height: 100%;
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
.lo-label-sub-type-icon {
|
|
203
|
+
color: #3fb5eb;
|
|
204
|
+
cursor: pointer;
|
|
205
|
+
margin-left: 4px;
|
|
206
|
+
margin-bottom: 3px;
|
|
207
|
+
display: inline-block;
|
|
208
|
+
:deep {
|
|
209
|
+
svg {
|
|
210
|
+
display: inline-block;
|
|
211
|
+
margin-bottom: -2.5px;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
.lo-label-history-icon {
|
|
216
|
+
display: inline-block;
|
|
217
|
+
line-height: 0;
|
|
218
|
+
margin-left: 4px;
|
|
219
|
+
margin-bottom: 3px;
|
|
220
|
+
cursor: pointer;
|
|
221
|
+
font-size: 14px;
|
|
222
|
+
}
|
|
223
|
+
.lo-label-tips-icon {
|
|
224
|
+
color: #4094f3;
|
|
225
|
+
cursor: pointer;
|
|
226
|
+
font-size: 14px !important;
|
|
227
|
+
margin-left: 4px;
|
|
228
|
+
}
|
|
229
|
+
:deep {
|
|
230
|
+
.ant-form-item-label {
|
|
231
|
+
label {
|
|
232
|
+
color: #333333;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
.ant-form-item-control-wrapper {
|
|
236
|
+
flex-grow: 1;
|
|
237
|
+
color: #333333;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
:deep {
|
|
241
|
+
.ant-input-group-addon, .ant-input-number-group-addon {
|
|
242
|
+
width: 40px;
|
|
243
|
+
min-height: 38px;
|
|
244
|
+
position: absolute;
|
|
245
|
+
right: 2px;
|
|
246
|
+
top: 1px;
|
|
247
|
+
border: none;
|
|
248
|
+
z-index: 999;
|
|
249
|
+
&:active {
|
|
250
|
+
opacity: .7;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
.addon-icon {
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
justify-content: center;
|
|
258
|
+
width: 100%;
|
|
259
|
+
height: 100%;
|
|
260
|
+
font-size: 15px;
|
|
261
|
+
cursor: pointer;
|
|
262
|
+
background-color: transparent;
|
|
263
|
+
}
|
|
264
|
+
.addon-inner {
|
|
265
|
+
display: flex;
|
|
266
|
+
align-items: center;
|
|
267
|
+
justify-content: center;
|
|
268
|
+
position: absolute;
|
|
269
|
+
width: 100%;
|
|
270
|
+
height: 100%;
|
|
271
|
+
top: 0;
|
|
272
|
+
left: 0;
|
|
273
|
+
cursor: pointer;
|
|
274
|
+
color: #999999;
|
|
275
|
+
background-color: #f2f2f2;
|
|
276
|
+
}
|
|
277
|
+
.addon-inner:active {
|
|
278
|
+
background: rgba(240, 240, 240, 0.3);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
.lo-textarea-count {
|
|
282
|
+
position: absolute;
|
|
283
|
+
line-height: 10px;
|
|
284
|
+
right: 0;
|
|
285
|
+
color: rgba(0, 0, 0, 0.45);
|
|
286
|
+
}
|
|
287
|
+
.lo-input-number-box {
|
|
288
|
+
width: 100%;
|
|
289
|
+
:deep {
|
|
290
|
+
.ant-input-number {
|
|
291
|
+
width: 100%;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
&.lo-with-unit {
|
|
295
|
+
:deep {
|
|
296
|
+
.ant-input-number {
|
|
297
|
+
border-top-right-radius: 0;
|
|
298
|
+
border-bottom-right-radius: 0;
|
|
299
|
+
border-right: 0;
|
|
300
|
+
.ant-input-number-handler-wrap {
|
|
301
|
+
border-top-right-radius: 0;
|
|
302
|
+
border-bottom-right-radius: 0;
|
|
303
|
+
opacity: 1;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
.ant-dropdown-trigger {
|
|
307
|
+
border-top-left-radius: 0;
|
|
308
|
+
border-bottom-left-radius: 0;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
&.lo-unit-1 {
|
|
312
|
+
:deep {
|
|
313
|
+
.ant-input-number {
|
|
314
|
+
width: calc(100% - 50px);
|
|
315
|
+
}
|
|
316
|
+
.ant-dropdown-trigger {
|
|
317
|
+
min-width: 50px;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
&.lo-unit-2 {
|
|
322
|
+
:deep {
|
|
323
|
+
.ant-input-number {
|
|
324
|
+
width: calc(100% - 80px);
|
|
325
|
+
}
|
|
326
|
+
.ant-dropdown-trigger {
|
|
327
|
+
min-width: 80px;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
&.lo-unit-3 {
|
|
332
|
+
:deep {
|
|
333
|
+
.ant-input-number {
|
|
334
|
+
width: calc(100% - 110px);
|
|
335
|
+
}
|
|
336
|
+
.ant-dropdown-trigger {
|
|
337
|
+
min-width: 110px;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
.lo-input-content {
|
|
344
|
+
align-items: center;
|
|
345
|
+
overflow: hidden;
|
|
346
|
+
text-overflow: ellipsis;
|
|
347
|
+
color: #333333;
|
|
348
|
+
font-size: 14px;
|
|
349
|
+
padding: 0 6px;
|
|
350
|
+
}
|
|
351
|
+
.lo-control-text {
|
|
352
|
+
white-space: pre-wrap;
|
|
353
|
+
word-break: break-all;
|
|
354
|
+
line-height: 22px;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
:deep .ant-select-multiple .ant-select-selection-item {
|
|
359
|
+
height: 40px !important;
|
|
360
|
+
margin: 0 4px 0 0 !important;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
.lo-empty-layout-container {
|
|
364
|
+
box-sizing: border-box;
|
|
365
|
+
display: grid;
|
|
366
|
+
border: none;
|
|
367
|
+
}
|
|
368
|
+
.lo-general-layout-container {
|
|
369
|
+
box-sizing: border-box;
|
|
370
|
+
display: grid;
|
|
371
|
+
grid-column-start: 1;
|
|
372
|
+
}
|
|
373
|
+
.lo-form-layout-root {
|
|
374
|
+
column-gap: 30px;
|
|
375
|
+
}
|
|
376
|
+
:deep .ant-form-item-label > label.ant-form-item-no-colon::after {
|
|
377
|
+
display: none;
|
|
378
|
+
}
|
|
379
|
+
.ant-input-textarea {
|
|
380
|
+
width: 100%;
|
|
381
|
+
}
|
|
382
|
+
.custom-border {
|
|
383
|
+
width: 100%;
|
|
384
|
+
min-height: 40px;
|
|
385
|
+
border-radius: .5rem;
|
|
386
|
+
border: 1px #e1e2e4 solid;
|
|
387
|
+
}
|
|
388
|
+
.lo-theme-textarea-box {
|
|
389
|
+
min-height: 81px !important;
|
|
390
|
+
:deep .ant-input {
|
|
391
|
+
min-height: 60px !important;
|
|
392
|
+
}
|
|
393
|
+
:deep .ant-form-item-control {
|
|
394
|
+
&:not(.has-error) {
|
|
395
|
+
padding-bottom: 1px !important;
|
|
396
|
+
.ant-form-explain {
|
|
397
|
+
display: none;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
package/src/styles/themes.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
.lo-form-container.lo-form-theme-default {
|
|
3
2
|
@import "theme2";
|
|
4
3
|
}
|
|
@@ -7,4 +6,13 @@
|
|
|
7
6
|
@import "theme1";
|
|
8
7
|
}
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
.lo-form-container.lo-form-theme-nitic {
|
|
10
|
+
@import "theme-3";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.lo-form-container.lo-form-theme-labelWrap {
|
|
14
|
+
@import "theme-4";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@import "datePicker";
|