lw-cdp-ui 1.1.9 → 1.1.10
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/lwForm/index.vue +45 -36
- package/dist/components/lwUpload/index.vue +0 -8
- package/dist/lw-cdp-ui.esm.js +3227 -4815
- package/dist/lw-cdp-ui.esm.js.map +1 -1
- package/dist/lw-cdp-ui.umd.js +14 -19
- package/dist/lw-cdp-ui.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +12 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-skeleton v-if="renderLoading || Object.keys(form).length==0"
|
|
2
|
+
<el-skeleton v-if="renderLoading || Object.keys(form).length == 0"
|
|
3
3
|
animated />
|
|
4
4
|
|
|
5
5
|
<el-form v-else
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
:prop="item?.options?.name ? `${item.name}.${item.options.name}` : item.name"
|
|
30
30
|
:rules="rulesHandle(item)">
|
|
31
31
|
<template #label>
|
|
32
|
-
{{item.label}}
|
|
32
|
+
{{ item.label }}
|
|
33
33
|
<el-tooltip v-if="item.tips"
|
|
34
34
|
:content="item.tips">
|
|
35
35
|
<el-icon><el-icon-question-filled /></el-icon>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
</template>
|
|
38
38
|
|
|
39
39
|
<!-- input -->
|
|
40
|
-
<template v-if="item.component=='input'">
|
|
40
|
+
<template v-if="item.component == 'input'">
|
|
41
41
|
<template v-if="item?.options?.name">
|
|
42
42
|
<el-input v-model="form[item.name][item.options.name]"
|
|
43
43
|
:placeholder="item.options.placeholder"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
:maxlength="item.options.maxlength"
|
|
48
48
|
show-word-limit>
|
|
49
49
|
<template v-if="item.options.append"
|
|
50
|
-
#append>{{item.options.append}}</template>
|
|
50
|
+
#append>{{ item.options.append }}</template>
|
|
51
51
|
</el-input>
|
|
52
52
|
</template>
|
|
53
53
|
<template v-else>
|
|
@@ -59,39 +59,39 @@
|
|
|
59
59
|
:maxlength="item.options.maxlength"
|
|
60
60
|
show-word-limit>
|
|
61
61
|
<template v-if="item.options.append"
|
|
62
|
-
#append>{{item.options.append}}</template>
|
|
62
|
+
#append>{{ item.options.append }}</template>
|
|
63
63
|
</el-input>
|
|
64
64
|
</template>
|
|
65
65
|
</template>
|
|
66
66
|
<!-- upload -->
|
|
67
|
-
<template v-else-if="item.component=='upload'">
|
|
67
|
+
<template v-else-if="item.component == 'upload'">
|
|
68
68
|
<template v-for="(_item, _index) in item.options.items"
|
|
69
69
|
:key="_index">
|
|
70
70
|
<template v-if="item.name">
|
|
71
|
-
<
|
|
71
|
+
<div style="margin-right: 5px;">
|
|
72
72
|
<lw-upload v-model="form[item.name][_item.name]"
|
|
73
73
|
:maxSize="_item.maxSize"
|
|
74
74
|
:accept="_item.accept"
|
|
75
75
|
:title="_item.label"
|
|
76
76
|
:parseData="item.parseData"
|
|
77
77
|
:apiObj="item.apiObj"></lw-upload>
|
|
78
|
-
</
|
|
78
|
+
</div>
|
|
79
79
|
</template>
|
|
80
80
|
<template v-else>
|
|
81
|
-
<
|
|
81
|
+
<div style="margin-right: 5px;">
|
|
82
82
|
<lw-upload v-model="form[_item.name]"
|
|
83
83
|
:maxSize="_item.maxSize"
|
|
84
84
|
:accept="_item.accept"
|
|
85
85
|
:title="_item.label"
|
|
86
86
|
:parseData="item.parseData"
|
|
87
87
|
:apiObj="item.apiObj"></lw-upload>
|
|
88
|
-
</
|
|
88
|
+
</div>
|
|
89
89
|
</template>
|
|
90
90
|
|
|
91
91
|
</template>
|
|
92
92
|
</template>
|
|
93
93
|
<!-- checkbox -->
|
|
94
|
-
<template v-else-if="item.component=='checkbox'">
|
|
94
|
+
<template v-else-if="item.component == 'checkbox'">
|
|
95
95
|
<template v-if="item.name">
|
|
96
96
|
<el-checkbox v-model="form[item.name][_item.name]"
|
|
97
97
|
:label="_item.label"
|
|
@@ -106,16 +106,16 @@
|
|
|
106
106
|
</template>
|
|
107
107
|
</template>
|
|
108
108
|
<!-- checkboxGroup -->
|
|
109
|
-
<template v-else-if="item.component=='checkboxGroup'">
|
|
109
|
+
<template v-else-if="item.component == 'checkboxGroup'">
|
|
110
110
|
<el-checkbox-group v-model="form[item.name]">
|
|
111
111
|
<el-checkbox v-for="_item in item.options.items"
|
|
112
112
|
:key="_item.value"
|
|
113
|
-
:label="_item.value">{{_item.label}}</el-checkbox>
|
|
113
|
+
:label="_item.value">{{ _item.label }}</el-checkbox>
|
|
114
114
|
</el-checkbox-group>
|
|
115
115
|
</template>
|
|
116
116
|
|
|
117
117
|
<!-- switch -->
|
|
118
|
-
<template v-else-if="item.component=='switch'">
|
|
118
|
+
<template v-else-if="item.component == 'switch'">
|
|
119
119
|
<template v-if="item?.options?.name">
|
|
120
120
|
<el-switch v-model="form[item.name][item.options.name]" />
|
|
121
121
|
</template>
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
</template>
|
|
125
125
|
</template>
|
|
126
126
|
<!-- select -->
|
|
127
|
-
<template v-else-if="item.component=='select'">
|
|
127
|
+
<template v-else-if="item.component == 'select'">
|
|
128
128
|
<template v-if="item?.options?.name">
|
|
129
129
|
<el-select v-model="form[item.name][item.options.name]"
|
|
130
130
|
:multiple="item.options?.multiple"
|
|
@@ -160,21 +160,23 @@
|
|
|
160
160
|
|
|
161
161
|
</template>
|
|
162
162
|
<!-- cascader -->
|
|
163
|
-
<template v-else-if="item.component=='cascader'">
|
|
163
|
+
<template v-else-if="item.component == 'cascader'">
|
|
164
164
|
<template v-if="item?.options?.name">
|
|
165
165
|
<el-cascader v-model="form[item.name][item.options.name]"
|
|
166
|
+
style="width: 100%;"
|
|
166
167
|
:options="item.options.items"
|
|
167
168
|
clearable></el-cascader>
|
|
168
169
|
</template>
|
|
169
170
|
<template v-else>
|
|
170
171
|
<el-cascader v-model="form[item.name]"
|
|
172
|
+
style="width: 100%;"
|
|
171
173
|
:options="item.options.items"
|
|
172
174
|
clearable></el-cascader>
|
|
173
175
|
</template>
|
|
174
176
|
|
|
175
177
|
</template>
|
|
176
178
|
<!-- date -->
|
|
177
|
-
<template v-else-if="item.component=='date'">
|
|
179
|
+
<template v-else-if="item.component == 'date'">
|
|
178
180
|
<template v-if="item?.options?.name">
|
|
179
181
|
<el-date-picker v-model="form[item.name][item.options.name]"
|
|
180
182
|
style="width: 100%;"
|
|
@@ -186,6 +188,7 @@
|
|
|
186
188
|
:default-time="item.options.defaultTime"
|
|
187
189
|
:disabled="item.options.disabled"
|
|
188
190
|
:value-format="item.options.valueFormat"
|
|
191
|
+
:format="item.options.format"
|
|
189
192
|
:placeholder="item.options.placeholder || '请选择'"></el-date-picker>
|
|
190
193
|
</template>
|
|
191
194
|
<template v-else>
|
|
@@ -199,52 +202,53 @@
|
|
|
199
202
|
:default-time="item.options.defaultTime"
|
|
200
203
|
:disabled="item.options.disabled"
|
|
201
204
|
:value-format="item.options.valueFormat"
|
|
205
|
+
:format="item.options.format"
|
|
202
206
|
:placeholder="item.options.placeholder || '请选择'"></el-date-picker>
|
|
203
207
|
</template>
|
|
204
208
|
|
|
205
209
|
</template>
|
|
206
210
|
<!-- number -->
|
|
207
|
-
<template v-else-if="item.component=='number'">
|
|
211
|
+
<template v-else-if="item.component == 'number'">
|
|
208
212
|
<template v-if="item?.options?.name">
|
|
209
213
|
<el-input-number v-model="form[item.name][item.options.name]"
|
|
210
|
-
:disabled="item.options
|
|
214
|
+
:disabled="item.options?.disabled"
|
|
211
215
|
:min="item?.options?.min"
|
|
212
216
|
:max="item?.options?.max"
|
|
213
217
|
:step="item?.options?.step || 1"
|
|
214
218
|
:precision="item?.options?.precision"
|
|
215
|
-
:placeholder="
|
|
219
|
+
:placeholder="item?.options?.placeholder || ''"
|
|
216
220
|
:controls-position="item?.options?.controlsPosition || 'right'">
|
|
217
221
|
<template v-if="item?.options?.suffix"
|
|
218
222
|
#suffix>
|
|
219
|
-
<span>{{item.options.suffix}}</span>
|
|
223
|
+
<span>{{ item.options.suffix }}</span>
|
|
220
224
|
</template>
|
|
221
225
|
</el-input-number>
|
|
222
226
|
</template>
|
|
223
227
|
<template v-else>
|
|
224
228
|
<el-input-number v-model="form[item.name]"
|
|
225
|
-
:disabled="item.options
|
|
229
|
+
:disabled="item.options?.disabled"
|
|
226
230
|
:min="item?.options?.min"
|
|
227
231
|
:max="item?.options?.max"
|
|
228
232
|
:step="item?.options?.step || 1"
|
|
229
233
|
:precision="item?.options?.precision"
|
|
230
|
-
:placeholder="
|
|
234
|
+
:placeholder="item?.options?.placeholder || ''"
|
|
231
235
|
:controls-position="item?.options?.controlsPosition || 'right'">
|
|
232
236
|
<template v-if="item?.options?.suffix"
|
|
233
237
|
#suffix>
|
|
234
|
-
<span>{{item.options.suffix}}</span>
|
|
238
|
+
<span>{{ item.options.suffix }}</span>
|
|
235
239
|
</template>
|
|
236
240
|
</el-input-number>
|
|
237
241
|
</template>
|
|
238
242
|
|
|
239
243
|
</template>
|
|
240
244
|
<!-- radio -->
|
|
241
|
-
<template v-else-if="item.component=='radio'">
|
|
245
|
+
<template v-else-if="item.component == 'radio'">
|
|
242
246
|
<template v-if="item?.options?.name">
|
|
243
247
|
<el-radio-group v-model="form[item.name][item.options.name]"
|
|
244
248
|
:disabled="item.options.disabled">
|
|
245
249
|
<el-radio v-for="_item in item.options.items"
|
|
246
250
|
:key="_item.value"
|
|
247
|
-
:label="_item.value">{{_item.label}}</el-radio>
|
|
251
|
+
:label="_item.value">{{ _item.label }}</el-radio>
|
|
248
252
|
</el-radio-group>
|
|
249
253
|
</template>
|
|
250
254
|
<template v-else>
|
|
@@ -252,13 +256,13 @@
|
|
|
252
256
|
:disabled="item.options.disabled">
|
|
253
257
|
<el-radio v-for="_item in item.options.items"
|
|
254
258
|
:key="_item.value"
|
|
255
|
-
:label="_item.value">{{_item.label}}</el-radio>
|
|
259
|
+
:label="_item.value">{{ _item.label }}</el-radio>
|
|
256
260
|
</el-radio-group>
|
|
257
261
|
</template>
|
|
258
262
|
|
|
259
263
|
</template>
|
|
260
264
|
<!-- color -->
|
|
261
|
-
<template v-else-if="item.component=='color'">
|
|
265
|
+
<template v-else-if="item.component == 'color'">
|
|
262
266
|
<template v-if="item?.options?.name">
|
|
263
267
|
<el-color-picker v-model="form[item.name][item.options.name]" />
|
|
264
268
|
</template>
|
|
@@ -268,7 +272,7 @@
|
|
|
268
272
|
|
|
269
273
|
</template>
|
|
270
274
|
<!-- rate -->
|
|
271
|
-
<template v-else-if="item.component=='rate'">
|
|
275
|
+
<template v-else-if="item.component == 'rate'">
|
|
272
276
|
<template v-if="item?.options?.name">
|
|
273
277
|
<el-rate style="margin-top: 6px;"
|
|
274
278
|
v-model="form[item.name][item.options.name]"></el-rate>
|
|
@@ -280,7 +284,7 @@
|
|
|
280
284
|
|
|
281
285
|
</template>
|
|
282
286
|
<!-- slider -->
|
|
283
|
-
<template v-else-if="item.component=='slider'">
|
|
287
|
+
<template v-else-if="item.component == 'slider'">
|
|
284
288
|
<template v-if="item?.options?.name">
|
|
285
289
|
<el-slider v-model="form[item.name][item.options.name]"
|
|
286
290
|
:marks="item.options.marks"></el-slider>
|
|
@@ -293,7 +297,7 @@
|
|
|
293
297
|
</template>
|
|
294
298
|
|
|
295
299
|
<!-- tags -->
|
|
296
|
-
<template v-else-if="item.component=='tags'">
|
|
300
|
+
<template v-else-if="item.component == 'tags'">
|
|
297
301
|
<div class="tags-list">
|
|
298
302
|
<template v-if="item?.options?.name">
|
|
299
303
|
<el-tag v-for="tag in form[item.name][item?.options?.name]"
|
|
@@ -332,12 +336,12 @@
|
|
|
332
336
|
<!-- 没有组件是component值 就是插槽名称 -->
|
|
333
337
|
<template v-else>
|
|
334
338
|
<slot :name="item.component">
|
|
335
|
-
<el-tag type="danger">[{{item.component}}]
|
|
339
|
+
<el-tag type="danger">[{{ item.component }}]
|
|
336
340
|
没有这个默认组件也未自定义插槽内容</el-tag>
|
|
337
341
|
</slot>
|
|
338
342
|
</template>
|
|
339
343
|
<div v-if="item.message"
|
|
340
|
-
class="el-form-item-msg">{{item.message}}</div>
|
|
344
|
+
class="el-form-item-msg">{{ item.message }}</div>
|
|
341
345
|
</el-form-item>
|
|
342
346
|
</el-col>
|
|
343
347
|
</template>
|
|
@@ -567,14 +571,19 @@ export default {
|
|
|
567
571
|
}
|
|
568
572
|
</script>
|
|
569
573
|
<style lang="scss" scoped>
|
|
570
|
-
.button-new-tag
|
|
574
|
+
.button-new-tag
|
|
575
|
+
{
|
|
571
576
|
margin-left: 10px;
|
|
572
577
|
}
|
|
573
|
-
|
|
578
|
+
|
|
579
|
+
.w-20
|
|
580
|
+
{
|
|
574
581
|
width: 100px;
|
|
575
582
|
margin-left: 10px;
|
|
576
583
|
}
|
|
577
|
-
|
|
584
|
+
|
|
585
|
+
.title-name
|
|
586
|
+
{
|
|
578
587
|
font-size: 18px;
|
|
579
588
|
font-weight: bold;
|
|
580
589
|
margin-bottom: 10px;
|
|
@@ -212,14 +212,6 @@ export default {
|
|
|
212
212
|
file.uid = this.$tool.getUUID('file, 16')
|
|
213
213
|
this.$refs.uploader.handleStart(file)
|
|
214
214
|
},
|
|
215
|
-
// parseData(res) {
|
|
216
|
-
// return {
|
|
217
|
-
// code: 200, //分析状态字段结构
|
|
218
|
-
// fileName: res.fileName,//分析文件名称
|
|
219
|
-
// src: res.previewInfo.url, //分析图片远程地址结构
|
|
220
|
-
// msg: res.message //分析描述字段结构
|
|
221
|
-
// }
|
|
222
|
-
// },
|
|
223
215
|
success(res, file) {
|
|
224
216
|
//释放内存删除blob
|
|
225
217
|
URL.revokeObjectURL(file.tempFile)
|