lw-cdp-ui 1.3.3-ui → 1.3.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/components/lwFormMini/FormItem.vue +71 -1
- package/dist/components/lwFormMini/ViewItem.vue +74 -0
- package/dist/components/lwFormMini/index.vue +118 -76
- package/dist/components/lwLayout/components/tags.vue +7 -4
- package/dist/components/lwLayout/index.vue +221 -65
- package/dist/components/lwLogin/index.vue +11 -44
- package/dist/components/lwSearch/index.vue +8 -0
- package/dist/components/lwTable/components/TableColumn.vue +39 -37
- package/dist/components/lwTable/index.scss +3 -0
- package/dist/lw-cdp-ui.esm.js +5190 -4943
- package/dist/lw-cdp-ui.umd.js +13 -13
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -384,6 +384,35 @@ export default {
|
|
|
384
384
|
|
|
385
385
|
|
|
386
386
|
<style lang="scss" scoped>
|
|
387
|
+
:deep(.el-col) {
|
|
388
|
+
&:first-child {
|
|
389
|
+
.title-name {
|
|
390
|
+
border: 0;
|
|
391
|
+
padding-top: 25px;
|
|
392
|
+
margin-top: 0;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.title-name {
|
|
398
|
+
font-size: 18px;
|
|
399
|
+
font-weight: bold;
|
|
400
|
+
margin-bottom: 10px;
|
|
401
|
+
margin-top: 25px;
|
|
402
|
+
border-top: 10px solid #f5f7fa;
|
|
403
|
+
padding-top: 20px;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.form-mini {
|
|
407
|
+
display: flex;
|
|
408
|
+
width: 100%;
|
|
409
|
+
box-sizing: border-box;
|
|
410
|
+
}
|
|
411
|
+
.form-affix {
|
|
412
|
+
min-width: 130px;
|
|
413
|
+
padding-left: 20px;
|
|
414
|
+
}
|
|
415
|
+
|
|
387
416
|
.w-20 {
|
|
388
417
|
width: 100px;
|
|
389
418
|
}
|
|
@@ -393,7 +422,48 @@ export default {
|
|
|
393
422
|
display: none !important;
|
|
394
423
|
}
|
|
395
424
|
}
|
|
396
|
-
|
|
425
|
+
.affix-body {
|
|
426
|
+
background-color: var(--el-fill-color-light);
|
|
427
|
+
border: 1px solid var(--el-border-color-light);
|
|
428
|
+
margin: 0;
|
|
429
|
+
position: relative;
|
|
430
|
+
&::after {
|
|
431
|
+
content: "";
|
|
432
|
+
position: absolute;
|
|
433
|
+
left: -2px;
|
|
434
|
+
right: 0;
|
|
435
|
+
height: 16px;
|
|
436
|
+
background-color: #ffffff;
|
|
437
|
+
top: -17px;
|
|
438
|
+
}
|
|
439
|
+
.anchor-link {
|
|
440
|
+
padding: 0 20px;
|
|
441
|
+
height: var(--el-tabs-header-height);
|
|
442
|
+
box-sizing: border-box;
|
|
443
|
+
list-style: none;
|
|
444
|
+
font-size: var(--el-font-size-base);
|
|
445
|
+
font-weight: bold;
|
|
446
|
+
color: var(--el-text-color-secondary);
|
|
447
|
+
position: relative;
|
|
448
|
+
height: 40px;
|
|
449
|
+
display: inline-block;
|
|
450
|
+
line-height: 40px;
|
|
451
|
+
cursor: pointer;
|
|
452
|
+
border-left: 1px solid transparent;
|
|
453
|
+
border-right: 1px solid transparent;
|
|
454
|
+
}
|
|
455
|
+
.active {
|
|
456
|
+
color: var(--el-color-primary);
|
|
457
|
+
background-color: var(--el-bg-color-overlay);
|
|
458
|
+
border-bottom: 1px solid var(--el-bg-color-overlay);
|
|
459
|
+
border-right-color: var(--el-border-color);
|
|
460
|
+
border-left: 1px solid var(--el-border-color-light);
|
|
461
|
+
border-right: 1px solid var(--el-border-color-light);
|
|
462
|
+
&:first-child {
|
|
463
|
+
border-left: 1px solid var(--el-fill-color-light);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
397
467
|
|
|
398
468
|
:deep(.el-tag) {
|
|
399
469
|
& + .button-new-tag {
|
|
@@ -299,6 +299,38 @@ export default {
|
|
|
299
299
|
|
|
300
300
|
|
|
301
301
|
<style lang="scss" scoped>
|
|
302
|
+
:deep(.el-col) {
|
|
303
|
+
&:first-child {
|
|
304
|
+
.title-name {
|
|
305
|
+
border: 0;
|
|
306
|
+
padding-top: 25px;
|
|
307
|
+
margin-top: 0;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.title-name {
|
|
313
|
+
font-size: 18px;
|
|
314
|
+
font-weight: bold;
|
|
315
|
+
margin-bottom: 10px;
|
|
316
|
+
margin-top: 25px;
|
|
317
|
+
border-top: 10px solid #f5f7fa;
|
|
318
|
+
padding-top: 20px;
|
|
319
|
+
display: flex;
|
|
320
|
+
align-items: center;
|
|
321
|
+
justify-content: space-between;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.form-mini {
|
|
325
|
+
display: flex;
|
|
326
|
+
width: 100%;
|
|
327
|
+
box-sizing: border-box;
|
|
328
|
+
}
|
|
329
|
+
.form-affix {
|
|
330
|
+
min-width: 130px;
|
|
331
|
+
padding-left: 20px;
|
|
332
|
+
}
|
|
333
|
+
|
|
302
334
|
.w-20 {
|
|
303
335
|
width: 100px;
|
|
304
336
|
}
|
|
@@ -308,6 +340,48 @@ export default {
|
|
|
308
340
|
display: none !important;
|
|
309
341
|
}
|
|
310
342
|
}
|
|
343
|
+
.affix-body {
|
|
344
|
+
background-color: var(--el-fill-color-light);
|
|
345
|
+
border: 1px solid var(--el-border-color-light);
|
|
346
|
+
margin: 0;
|
|
347
|
+
position: relative;
|
|
348
|
+
&::after {
|
|
349
|
+
content: "";
|
|
350
|
+
position: absolute;
|
|
351
|
+
left: -2px;
|
|
352
|
+
right: 0;
|
|
353
|
+
height: 16px;
|
|
354
|
+
background-color: #ffffff;
|
|
355
|
+
top: -17px;
|
|
356
|
+
}
|
|
357
|
+
.anchor-link {
|
|
358
|
+
padding: 0 20px;
|
|
359
|
+
height: var(--el-tabs-header-height);
|
|
360
|
+
box-sizing: border-box;
|
|
361
|
+
list-style: none;
|
|
362
|
+
font-size: var(--el-font-size-base);
|
|
363
|
+
font-weight: bold;
|
|
364
|
+
color: var(--el-text-color-secondary);
|
|
365
|
+
position: relative;
|
|
366
|
+
height: 40px;
|
|
367
|
+
display: inline-block;
|
|
368
|
+
line-height: 40px;
|
|
369
|
+
cursor: pointer;
|
|
370
|
+
border-left: 1px solid transparent;
|
|
371
|
+
border-right: 1px solid transparent;
|
|
372
|
+
}
|
|
373
|
+
.active {
|
|
374
|
+
color: var(--el-color-primary);
|
|
375
|
+
background-color: var(--el-bg-color-overlay);
|
|
376
|
+
border-bottom: 1px solid var(--el-bg-color-overlay);
|
|
377
|
+
border-right-color: var(--el-border-color);
|
|
378
|
+
border-left: 1px solid var(--el-border-color-light);
|
|
379
|
+
border-right: 1px solid var(--el-border-color-light);
|
|
380
|
+
&:first-child {
|
|
381
|
+
border-left: 1px solid var(--el-fill-color-light);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
311
385
|
|
|
312
386
|
:deep(.el-tag) {
|
|
313
387
|
& + .button-new-tag {
|
|
@@ -20,68 +20,68 @@
|
|
|
20
20
|
|
|
21
21
|
<el-form v-else
|
|
22
22
|
ref="form"
|
|
23
|
-
class="lw-form-mini"
|
|
24
23
|
:model="form"
|
|
25
24
|
:label-width="config.labelWidth"
|
|
26
25
|
:label-position="$i18n.locale == 'en-us' ? 'top' : config.labelPosition"
|
|
27
26
|
v-loading="loading"
|
|
28
27
|
:size="config?.size || 'default'"
|
|
29
28
|
element-loading-text="Loading...">
|
|
30
|
-
<
|
|
31
|
-
v-for="card in formItems">
|
|
32
|
-
<el-row :gutter="15">
|
|
33
|
-
<template v-for="(item, index) in card">
|
|
34
|
-
<el-col :span="item.span || 24"
|
|
35
|
-
v-if="!hideHandle(item)">
|
|
36
|
-
<ViewItem v-if="isView && !item?.options?.isInput"
|
|
37
|
-
:item="item"
|
|
38
|
-
:form="form"
|
|
39
|
-
:index="index">
|
|
40
|
-
<!-- 没有组件是component值 就是插槽名称 -->
|
|
41
|
-
<template v-if="!['input', 'upload', 'checkbox', 'checkboxGroup', 'switch', 'select', 'treeSelect', 'cascader', 'date', 'number', 'radio', 'color', 'rate', 'slider','tags', 'divider'].includes(item.component)"
|
|
42
|
-
v-slot:[item.component]>
|
|
43
|
-
<slot :name="item.component"
|
|
44
|
-
:itemCur="item"
|
|
45
|
-
:formCur="form">
|
|
46
|
-
<el-tag type="danger">[{{ item.component }}]
|
|
47
|
-
没有这个默认组件也未自定义插槽内容</el-tag>
|
|
48
|
-
</slot>
|
|
49
|
-
</template>
|
|
50
|
-
<template v-if="item?.options?.component"
|
|
51
|
-
v-slot:[item?.options?.component]>
|
|
52
|
-
<slot :name="item?.options?.component"></slot>
|
|
53
|
-
</template>
|
|
29
|
+
<el-row :gutter="15">
|
|
54
30
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
31
|
+
<template v-for="(item, index) in config.formItems">
|
|
32
|
+
<el-col :span="item.span || 24"
|
|
33
|
+
v-if="!hideHandle(item)">
|
|
34
|
+
<ViewItem v-if="isView && !item?.options?.isInput"
|
|
35
|
+
:item="item"
|
|
36
|
+
:form="form"
|
|
37
|
+
:index="index">
|
|
38
|
+
<!-- 没有组件是component值 就是插槽名称 -->
|
|
39
|
+
<template v-if="!['input', 'upload', 'checkbox', 'checkboxGroup', 'switch', 'select', 'treeSelect', 'cascader', 'date', 'number', 'radio', 'color', 'rate', 'slider','tags', 'divider'].includes(item.component)"
|
|
40
|
+
v-slot:[item.component]>
|
|
41
|
+
<slot :name="item.component"
|
|
42
|
+
:itemCur="item"
|
|
43
|
+
:formCur="form">
|
|
44
|
+
<el-tag type="danger">[{{ item.component }}]
|
|
45
|
+
没有这个默认组件也未自定义插槽内容</el-tag>
|
|
46
|
+
</slot>
|
|
47
|
+
</template>
|
|
48
|
+
<template v-if="item?.options?.component"
|
|
49
|
+
v-slot:[item?.options?.component]>
|
|
50
|
+
<slot :name="item?.options?.component"></slot>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
</ViewItem>
|
|
54
|
+
<FormItem v-else
|
|
55
|
+
:item="item"
|
|
56
|
+
:form="form"
|
|
57
|
+
:index="index">
|
|
58
|
+
<!-- 没有组件是component值 就是插槽名称 -->
|
|
59
|
+
<template v-if="!['input', 'upload', 'checkbox', 'checkboxGroup', 'switch', 'select', 'treeSelect', 'cascader', 'date', 'number', 'radio', 'color', 'rate', 'slider','tags', 'divider'].includes(item.component)"
|
|
60
|
+
v-slot:[item.component]>
|
|
61
|
+
<slot :name="item.component"
|
|
62
|
+
:itemCur="item"
|
|
63
|
+
:formCur="form">
|
|
64
|
+
<el-tag type="danger">[{{ item.component }}]
|
|
65
|
+
没有这个默认组件也未自定义插槽内容</el-tag>
|
|
66
|
+
</slot>
|
|
67
|
+
</template>
|
|
68
|
+
<template v-if="item?.options?.component"
|
|
69
|
+
v-slot:[item?.options?.component]>
|
|
70
|
+
<slot :name="item?.options?.component"></slot>
|
|
71
|
+
</template>
|
|
72
|
+
</FormItem>
|
|
73
|
+
</el-col>
|
|
74
|
+
</template>
|
|
75
|
+
<el-col v-if="!isView"
|
|
76
|
+
:span="24">
|
|
77
|
+
<el-form-item>
|
|
78
|
+
<slot>
|
|
79
|
+
<el-button type="primary"
|
|
80
|
+
@click="submit">提交</el-button>
|
|
81
|
+
</slot>
|
|
82
|
+
</el-form-item>
|
|
83
|
+
</el-col>
|
|
84
|
+
</el-row>
|
|
85
85
|
</el-form>
|
|
86
86
|
</template>
|
|
87
87
|
|
|
@@ -174,34 +174,15 @@ export default {
|
|
|
174
174
|
hasValue() {
|
|
175
175
|
return Object.keys(this.modelValue).length > 0
|
|
176
176
|
},
|
|
177
|
-
formItems() {
|
|
178
|
-
const result = [];
|
|
179
|
-
let currentGroup = [];
|
|
180
|
-
|
|
181
|
-
this.config.formItems.forEach(item => {
|
|
182
|
-
if (item.component === "divider") {
|
|
183
|
-
if (currentGroup.length) {
|
|
184
|
-
result.push(currentGroup);
|
|
185
|
-
currentGroup = [];
|
|
186
|
-
}
|
|
187
|
-
currentGroup.push(item);
|
|
188
|
-
} else {
|
|
189
|
-
currentGroup.push(item);
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
177
|
|
|
193
|
-
if (currentGroup.length) {
|
|
194
|
-
result.push(currentGroup);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
return result;
|
|
198
|
-
}
|
|
199
178
|
},
|
|
200
179
|
mounted() {
|
|
201
180
|
if (this.hasConfig) {
|
|
202
181
|
this.render()
|
|
203
182
|
}
|
|
204
183
|
},
|
|
184
|
+
beforeDestroy() {
|
|
185
|
+
},
|
|
205
186
|
methods: {
|
|
206
187
|
/**
|
|
207
188
|
* 渲染表单数据。
|
|
@@ -352,6 +333,16 @@ export default {
|
|
|
352
333
|
}
|
|
353
334
|
</script>
|
|
354
335
|
<style lang="scss" scoped>
|
|
336
|
+
:deep(.el-col) {
|
|
337
|
+
&:first-child {
|
|
338
|
+
.title-name {
|
|
339
|
+
border: 0;
|
|
340
|
+
padding-top: 25px;
|
|
341
|
+
margin-top: 0;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
355
346
|
.form-mini {
|
|
356
347
|
display: flex;
|
|
357
348
|
width: 100%;
|
|
@@ -370,9 +361,60 @@ export default {
|
|
|
370
361
|
margin-left: 10px;
|
|
371
362
|
}
|
|
372
363
|
|
|
364
|
+
.title-name {
|
|
365
|
+
font-size: 18px;
|
|
366
|
+
font-weight: bold;
|
|
367
|
+
margin-bottom: 10px;
|
|
368
|
+
margin-top: 25px;
|
|
369
|
+
border-top: 10px solid #f5f7fa;
|
|
370
|
+
padding-top: 20px;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
373
|
:deep(.form-item-name-null) {
|
|
374
374
|
> .el-form-item__label {
|
|
375
375
|
display: none !important;
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
+
.affix-body {
|
|
379
|
+
background-color: var(--el-fill-color-light);
|
|
380
|
+
border: 1px solid var(--el-border-color-light);
|
|
381
|
+
margin: 0;
|
|
382
|
+
position: relative;
|
|
383
|
+
&::after {
|
|
384
|
+
content: "";
|
|
385
|
+
position: absolute;
|
|
386
|
+
left: -2px;
|
|
387
|
+
right: 0;
|
|
388
|
+
height: 16px;
|
|
389
|
+
background-color: #ffffff;
|
|
390
|
+
top: -17px;
|
|
391
|
+
}
|
|
392
|
+
.anchor-link {
|
|
393
|
+
padding: 0 20px;
|
|
394
|
+
height: var(--el-tabs-header-height);
|
|
395
|
+
box-sizing: border-box;
|
|
396
|
+
list-style: none;
|
|
397
|
+
font-size: var(--el-font-size-base);
|
|
398
|
+
font-weight: bold;
|
|
399
|
+
color: var(--el-text-color-secondary);
|
|
400
|
+
position: relative;
|
|
401
|
+
height: 40px;
|
|
402
|
+
display: inline-block;
|
|
403
|
+
line-height: 40px;
|
|
404
|
+
cursor: pointer;
|
|
405
|
+
border-left: 1px solid transparent;
|
|
406
|
+
border-right: 1px solid transparent;
|
|
407
|
+
}
|
|
408
|
+
.active {
|
|
409
|
+
color: var(--el-color-primary);
|
|
410
|
+
background-color: var(--el-bg-color-overlay);
|
|
411
|
+
border-bottom: 1px solid var(--el-bg-color-overlay);
|
|
412
|
+
border-right-color: var(--el-border-color);
|
|
413
|
+
border-left: 1px solid var(--el-border-color-light);
|
|
414
|
+
border-right: 1px solid var(--el-border-color-light);
|
|
415
|
+
&:first-child {
|
|
416
|
+
border-left: 1px solid var(--el-fill-color-light);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
378
420
|
</style>
|
|
@@ -179,11 +179,14 @@ export default {
|
|
|
179
179
|
closeSelectedTag(tag, autoPushLatestView = true) {
|
|
180
180
|
let item = this.menu[0]
|
|
181
181
|
if (item.children) {
|
|
182
|
-
item =
|
|
182
|
+
item = item.children[0]
|
|
183
183
|
}
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
|
|
185
|
+
// 兼容合并菜单
|
|
186
|
+
if (item.meta?.code) {
|
|
187
|
+
item.path = `/i/${item.name}`
|
|
186
188
|
}
|
|
189
|
+
|
|
187
190
|
this.$store.commit("removeViewTags", tag)
|
|
188
191
|
this.$store.commit("removeIframeList", tag)
|
|
189
192
|
this.$store.commit("removeKeepLive", tag.name)
|
|
@@ -193,7 +196,7 @@ export default {
|
|
|
193
196
|
if (latestView) {
|
|
194
197
|
this.$router.push(latestView)
|
|
195
198
|
} else {
|
|
196
|
-
this.$router.push(
|
|
199
|
+
this.$router.push({ path: item.path })
|
|
197
200
|
}
|
|
198
201
|
}
|
|
199
202
|
},
|