lw-cdp-ui 1.1.32 → 1.1.33
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/components/lwFormMini/index.vue +3 -6
- package/dist/components/lwTableForm/index.vue +16 -11
- package/dist/components/lwUpload/index.vue +116 -128
- package/dist/lw-cdp-ui.esm.js +1746 -1736
- package/dist/lw-cdp-ui.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -296,7 +296,8 @@ export default {
|
|
|
296
296
|
handler(val, old) {
|
|
297
297
|
if (this.hasConfig && this.isChange) {
|
|
298
298
|
let form = this.flattenObject(val)
|
|
299
|
-
|
|
299
|
+
console.log(this.form, form)
|
|
300
|
+
// this.form = Object.assign(this.form, form)
|
|
300
301
|
}
|
|
301
302
|
},
|
|
302
303
|
deep: true
|
|
@@ -449,11 +450,7 @@ export default {
|
|
|
449
450
|
// prop NAME
|
|
450
451
|
getPropName(item) {
|
|
451
452
|
if (item.component == 'checkbox' || item.component == 'upload') {
|
|
452
|
-
|
|
453
|
-
return `${item.name}.${item.options.items[0].name}`
|
|
454
|
-
} else {
|
|
455
|
-
return item.options.items[0].name
|
|
456
|
-
}
|
|
453
|
+
return item.options.items[0].name
|
|
457
454
|
|
|
458
455
|
} else {
|
|
459
456
|
return item.name
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
<template v-else-if="item.component=='upload'">
|
|
40
40
|
<el-col v-for="(_item, _index) in item.options.items"
|
|
41
41
|
:key="_index">
|
|
42
|
-
<lw-upload v-model="row[_item.name]"
|
|
43
|
-
:title="_item.label"></lw-upload>
|
|
42
|
+
<lw-upload v-model="row[_item.name]"></lw-upload>
|
|
44
43
|
<div class="error-tips">
|
|
45
|
-
{{ row['errorMsg'][_item.name] }}
|
|
44
|
+
{{ row['errorMsg'][_item.name] }}
|
|
45
|
+
</div>
|
|
46
46
|
|
|
47
47
|
</el-col>
|
|
48
48
|
</template>
|
|
@@ -130,14 +130,19 @@
|
|
|
130
130
|
<!-- number -->
|
|
131
131
|
<template v-else-if="item.component=='number'">
|
|
132
132
|
<el-input-number v-model="row[item.name]"
|
|
133
|
+
:disabled="item.options?.disabled"
|
|
134
|
+
:min="item?.options?.min"
|
|
135
|
+
:max="item?.options?.max"
|
|
133
136
|
size="small"
|
|
134
|
-
:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
:step="item?.options?.step || 1"
|
|
138
|
+
:precision="item?.options?.precision"
|
|
139
|
+
:placeholder="item?.options?.placeholder || ''"
|
|
140
|
+
:controls-position="item?.options?.controlsPosition || 'right'">
|
|
141
|
+
<template v-if="item?.options?.suffix"
|
|
142
|
+
#suffix>
|
|
143
|
+
<span>{{ item.options.suffix }}</span>
|
|
144
|
+
</template>
|
|
145
|
+
</el-input-number>
|
|
141
146
|
|
|
142
147
|
</template>
|
|
143
148
|
<!-- radio -->
|
|
@@ -201,7 +206,7 @@
|
|
|
201
206
|
</template>
|
|
202
207
|
|
|
203
208
|
<!-- 按钮 -->
|
|
204
|
-
<template v-else-if="item.component == 'operation'
|
|
209
|
+
<template v-else-if="item.component == 'operation'">
|
|
205
210
|
<!-- 默认新增/删除 -->
|
|
206
211
|
<span v-for="o in item.options.addDelete"
|
|
207
212
|
:key="o"
|
|
@@ -169,17 +169,15 @@ export default {
|
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
171
|
handleRemove(index) {
|
|
172
|
-
|
|
173
|
-
this.fileList.splice(index, 1)
|
|
174
|
-
}
|
|
172
|
+
this.fileList.splice(index, 1)
|
|
175
173
|
this.clearFiles()
|
|
176
174
|
},
|
|
177
175
|
clearFiles() {
|
|
178
|
-
URL.revokeObjectURL(this.file
|
|
176
|
+
URL.revokeObjectURL(this.file?.tempFile)
|
|
179
177
|
this.value = ""
|
|
180
178
|
this.file = null
|
|
181
179
|
this.$nextTick(() => {
|
|
182
|
-
this.$refs.uploader
|
|
180
|
+
this.$refs.uploader?.clearFiles()
|
|
183
181
|
})
|
|
184
182
|
},
|
|
185
183
|
change(file, files) {
|
|
@@ -241,7 +239,6 @@ export default {
|
|
|
241
239
|
}
|
|
242
240
|
var response = this.parseData(res, file)
|
|
243
241
|
file.url = response.src
|
|
244
|
-
console.log(this.fileList)
|
|
245
242
|
this.fileList.push(file.url)
|
|
246
243
|
if (this.multiple) {
|
|
247
244
|
this.value = this.fileList
|
|
@@ -287,149 +284,140 @@ export default {
|
|
|
287
284
|
</script>
|
|
288
285
|
|
|
289
286
|
<style lang="scss" scoped>
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
.lw-upload {
|
|
293
|
-
.el-upload--picture-card {
|
|
294
|
-
border-color: var(--el-color-danger);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
287
|
+
.el-form-item.is-error .lw-upload .el-upload--picture-card {
|
|
288
|
+
border-color: var(--el-color-danger);
|
|
297
289
|
}
|
|
298
290
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
gap: 10px;
|
|
303
|
-
width: 100%;
|
|
304
|
-
flex-wrap: wrap;
|
|
305
|
-
justify-content: left;
|
|
306
|
-
.el-upload--picture-card {
|
|
307
|
-
border-radius: 0;
|
|
308
|
-
}
|
|
291
|
+
.lw-upload .el-upload--picture-card {
|
|
292
|
+
border-radius: 0;
|
|
293
|
+
}
|
|
309
294
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
295
|
+
.lw-upload .uploader,
|
|
296
|
+
.lw-upload:deep(.el-upload) {
|
|
297
|
+
width: 100%;
|
|
298
|
+
height: 100%;
|
|
299
|
+
}
|
|
315
300
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
301
|
+
.lw-upload__img {
|
|
302
|
+
width: 100%;
|
|
303
|
+
height: 100%;
|
|
304
|
+
position: relative;
|
|
305
|
+
}
|
|
320
306
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
307
|
+
.lw-upload__img .image {
|
|
308
|
+
width: 100%;
|
|
309
|
+
height: 100%;
|
|
310
|
+
}
|
|
325
311
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
312
|
+
.lw-upload__img-actions {
|
|
313
|
+
position: absolute;
|
|
314
|
+
top: 0;
|
|
315
|
+
right: 0;
|
|
316
|
+
display: none;
|
|
317
|
+
}
|
|
331
318
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
319
|
+
.lw-upload__img-actions span {
|
|
320
|
+
display: flex;
|
|
321
|
+
justify-content: center;
|
|
322
|
+
align-items: center;
|
|
323
|
+
width: 25px;
|
|
324
|
+
height: 25px;
|
|
325
|
+
cursor: pointer;
|
|
326
|
+
color: #fff;
|
|
327
|
+
}
|
|
340
328
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
329
|
+
.lw-upload__img-actions span i {
|
|
330
|
+
font-size: 12px;
|
|
331
|
+
}
|
|
344
332
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
}
|
|
333
|
+
.lw-upload__img-actions .del {
|
|
334
|
+
background: #f56c6c;
|
|
335
|
+
}
|
|
350
336
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
}
|
|
337
|
+
.lw-upload__img:hover .lw-upload__img-actions {
|
|
338
|
+
display: block;
|
|
339
|
+
}
|
|
357
340
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
341
|
+
.lw-upload__img-slot {
|
|
342
|
+
display: flex;
|
|
343
|
+
justify-content: center;
|
|
344
|
+
align-items: center;
|
|
345
|
+
width: 100%;
|
|
346
|
+
height: 100%;
|
|
347
|
+
font-size: 12px;
|
|
348
|
+
background-color: var(--el-fill-color-lighter);
|
|
349
|
+
}
|
|
367
350
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
351
|
+
.lw-upload__uploading {
|
|
352
|
+
width: 100%;
|
|
353
|
+
height: 100%;
|
|
354
|
+
position: relative;
|
|
355
|
+
}
|
|
372
356
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
357
|
+
.lw-upload__progress {
|
|
358
|
+
position: absolute;
|
|
359
|
+
width: 100%;
|
|
360
|
+
height: 100%;
|
|
361
|
+
display: flex;
|
|
362
|
+
justify-content: center;
|
|
363
|
+
align-items: center;
|
|
364
|
+
background-color: var(--el-overlay-color-lighter);
|
|
365
|
+
z-index: 1;
|
|
366
|
+
padding: 10px;
|
|
367
|
+
}
|
|
377
368
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
height: 100%;
|
|
382
|
-
display: flex;
|
|
383
|
-
justify-content: center;
|
|
384
|
-
align-items: center;
|
|
385
|
-
background-color: var(--el-overlay-color-lighter);
|
|
386
|
-
z-index: 1;
|
|
387
|
-
padding: 10px;
|
|
369
|
+
.lw-upload__progress .el-progress {
|
|
370
|
+
width: 100%;
|
|
371
|
+
}
|
|
388
372
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
373
|
+
.lw-upload__uploading .image {
|
|
374
|
+
width: 100%;
|
|
375
|
+
height: 100%;
|
|
376
|
+
}
|
|
394
377
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
378
|
+
.lw-upload .file-empty {
|
|
379
|
+
width: 100%;
|
|
380
|
+
height: 100%;
|
|
381
|
+
display: flex;
|
|
382
|
+
justify-content: center;
|
|
383
|
+
align-items: center;
|
|
384
|
+
flex-direction: column;
|
|
385
|
+
}
|
|
386
|
+
.lw-upload{
|
|
387
|
+
display: flex;
|
|
388
|
+
align-items: center;
|
|
389
|
+
flex-wrap: wrap;
|
|
390
|
+
gap: 10px;
|
|
391
|
+
}
|
|
402
392
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
393
|
+
.lw-upload .file-empty i {
|
|
394
|
+
font-size: 28px;
|
|
395
|
+
}
|
|
406
396
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
}
|
|
397
|
+
.lw-upload .file-empty h4 {
|
|
398
|
+
font-size: 12px;
|
|
399
|
+
font-weight: normal;
|
|
400
|
+
color: #8c939d;
|
|
401
|
+
margin-top: 8px;
|
|
402
|
+
}
|
|
414
403
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
404
|
+
.lw-upload.lw-upload-round {
|
|
405
|
+
border-radius: 50%;
|
|
406
|
+
overflow: hidden;
|
|
407
|
+
}
|
|
418
408
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
409
|
+
.lw-upload.lw-upload-round .el-upload--picture-card {
|
|
410
|
+
border-radius: 50%;
|
|
411
|
+
}
|
|
422
412
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
413
|
+
.lw-upload.lw-upload-round .lw-upload__img-actions {
|
|
414
|
+
top: auto;
|
|
415
|
+
left: 0;
|
|
416
|
+
right: 0;
|
|
417
|
+
bottom: 0;
|
|
418
|
+
}
|
|
428
419
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
}
|
|
420
|
+
.lw-upload.lw-upload-round .lw-upload__img-actions span {
|
|
421
|
+
width: 100%;
|
|
434
422
|
}
|
|
435
423
|
</style>
|