meixioacomponent 0.2.32 → 0.2.34
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/lib/meixioacomponent.common.js +709 -214
- package/lib/meixioacomponent.umd.js +709 -214
- package/lib/meixioacomponent.umd.min.js +6 -6
- package/lib/style/element/index.css +11 -24
- package/package.json +1 -1
- package/packages/components/base/baseTreeSelect/index.js +7 -0
- package/packages/components/base/baseTreeSelect/index.vue +241 -0
- package/packages/components/index.js +3 -0
- package/packages/components/proForm/dialogForm/baseDialogForm.vue +76 -7
- package/packages/components/proForm/proForm/pro_form-item_skeleton.vue +2 -2
- package/packages/components/proForm/proForm/pro_form.vue +118 -24
- package/packages/components/proForm/proForm/pro_form_item.vue +26 -0
- package/packages/components/style/element/index.css +11 -24
|
@@ -9,6 +9,55 @@
|
|
|
9
9
|
:label-position="labelPosition"
|
|
10
10
|
>
|
|
11
11
|
<div
|
|
12
|
+
:key="item.key"
|
|
13
|
+
v-for="item in module"
|
|
14
|
+
v-show="!item.renderHide"
|
|
15
|
+
class="pro-form-item-content"
|
|
16
|
+
:class="[`chunk-${chunkLength}`]"
|
|
17
|
+
>
|
|
18
|
+
<el-form-item
|
|
19
|
+
:prop="item.key"
|
|
20
|
+
:label="item.label"
|
|
21
|
+
:class="[`${flexClass}`, size]"
|
|
22
|
+
>
|
|
23
|
+
<span slot="label" class="item-label">{{ item.label }}</span>
|
|
24
|
+
<pro_form_itemVue
|
|
25
|
+
:form="form"
|
|
26
|
+
:size="size"
|
|
27
|
+
:config="item"
|
|
28
|
+
:class="[`form-item-${item.key}`]"
|
|
29
|
+
@formItemConfirm="formItemConfirm"
|
|
30
|
+
@disableWatcherResult="disableWatcherResult"
|
|
31
|
+
:disableWatcher="setWatcher(item.key)"
|
|
32
|
+
v-if="formType == 'default' && item.type != 'area'"
|
|
33
|
+
v-model="item.value"
|
|
34
|
+
>
|
|
35
|
+
<template slot="template" v-if="item.type == 'template'">
|
|
36
|
+
<slot :name="`form-${item.key}`" :scope="module"></slot>
|
|
37
|
+
</template>
|
|
38
|
+
</pro_form_itemVue>
|
|
39
|
+
<baseAreaVue
|
|
40
|
+
:disable="item.disabled"
|
|
41
|
+
v-if="item.type == 'area'"
|
|
42
|
+
:ref="`area-${item.key}`"
|
|
43
|
+
v-model="item.value"
|
|
44
|
+
:class="[`form-item-${item.key}`]"
|
|
45
|
+
@confirmAreaValue="
|
|
46
|
+
formItemConfirm({
|
|
47
|
+
config: item,
|
|
48
|
+
})
|
|
49
|
+
"
|
|
50
|
+
></baseAreaVue>
|
|
51
|
+
<baseUploadVue
|
|
52
|
+
:max="formConfig.max"
|
|
53
|
+
v-if="formType == `upload`"
|
|
54
|
+
v-model="item.value"
|
|
55
|
+
:class="[`form-item-${item.key}`]"
|
|
56
|
+
></baseUploadVue>
|
|
57
|
+
</el-form-item>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<!-- <div
|
|
12
61
|
:key="index"
|
|
13
62
|
class="form-line-box"
|
|
14
63
|
v-for="(item, index) in formLineList"
|
|
@@ -17,31 +66,31 @@
|
|
|
17
66
|
:key="cindex"
|
|
18
67
|
:prop="citem.key"
|
|
19
68
|
:label="citem.label"
|
|
69
|
+
v-show="!citem.renderHide"
|
|
20
70
|
v-for="(citem, cindex) in item"
|
|
21
71
|
:class="[`chunk-${chunkLength}`, `${flexClass}`, size]"
|
|
22
72
|
>
|
|
23
73
|
<span slot="label" class="item-label">{{ citem.label }}</span>
|
|
24
74
|
<pro_form_itemVue
|
|
25
|
-
:config="citem"
|
|
26
75
|
:form="form"
|
|
27
76
|
:size="size"
|
|
77
|
+
:config="citem"
|
|
28
78
|
:class="[`form-item-${citem.key}`]"
|
|
29
|
-
v-if="formType == 'default' && citem.type != 'area'"
|
|
30
79
|
@formItemConfirm="formItemConfirm"
|
|
31
|
-
@
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
v-model="
|
|
80
|
+
@disableWatcherResult="disableWatcherResult"
|
|
81
|
+
:disableWatcher="setWatcher(citem.key)"
|
|
82
|
+
v-if="formType == 'default' && citem.type != 'area'"
|
|
83
|
+
v-model="module[findFormItem(index, cindex)].value"
|
|
35
84
|
>
|
|
36
85
|
<template slot="template" v-if="citem.type == 'template'">
|
|
37
|
-
<slot :name="`form-${citem.key}`" :scope="
|
|
86
|
+
<slot :name="`form-${citem.key}`" :scope="module"></slot>
|
|
38
87
|
</template>
|
|
39
88
|
</pro_form_itemVue>
|
|
40
89
|
<baseAreaVue
|
|
41
90
|
:disable="citem.disabled"
|
|
42
91
|
v-if="citem.type == 'area'"
|
|
43
92
|
:ref="`area-${citem.key}`"
|
|
44
|
-
v-model="
|
|
93
|
+
v-model="module[findFormItem(index, cindex)].value"
|
|
45
94
|
:class="[`form-item-${citem.key}`]"
|
|
46
95
|
@confirmAreaValue="
|
|
47
96
|
formItemConfirm({
|
|
@@ -52,11 +101,11 @@
|
|
|
52
101
|
<baseUploadVue
|
|
53
102
|
:max="formConfig.max"
|
|
54
103
|
v-if="formType == `upload`"
|
|
55
|
-
v-model="
|
|
104
|
+
v-model="module[findFormItem(index, cindex)].value"
|
|
56
105
|
:class="[`form-item-${citem.key}`]"
|
|
57
106
|
></baseUploadVue>
|
|
58
107
|
</el-form-item>
|
|
59
|
-
</div>
|
|
108
|
+
</div> -->
|
|
60
109
|
|
|
61
110
|
<baseButtonHandleVue
|
|
62
111
|
v-if="footer"
|
|
@@ -69,18 +118,12 @@
|
|
|
69
118
|
|
|
70
119
|
<div class="form-skeleton-wrap" v-else>
|
|
71
120
|
<div
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
v-for="
|
|
121
|
+
class="form-skeleton-item-wrap"
|
|
122
|
+
:key="item.key"
|
|
123
|
+
v-for="item in module"
|
|
124
|
+
:class="[`chunk-${chunkLength}`, `${flexClass}`, size]"
|
|
75
125
|
>
|
|
76
|
-
<
|
|
77
|
-
class="form-skeleton-item-wrap"
|
|
78
|
-
:key="cindex"
|
|
79
|
-
v-for="(citem, cindex) in item"
|
|
80
|
-
:class="[`chunk-${chunkLength}`, `${flexClass}`, size]"
|
|
81
|
-
>
|
|
82
|
-
<pro_formItem_skeletonVue></pro_formItem_skeletonVue>
|
|
83
|
-
</div>
|
|
126
|
+
<pro_formItem_skeletonVue></pro_formItem_skeletonVue>
|
|
84
127
|
</div>
|
|
85
128
|
</div>
|
|
86
129
|
</div>
|
|
@@ -107,9 +150,13 @@ export default {
|
|
|
107
150
|
mounted() {
|
|
108
151
|
this.$nextTick(() => {
|
|
109
152
|
this.init();
|
|
153
|
+
console.log(this.module);
|
|
110
154
|
});
|
|
111
155
|
},
|
|
112
156
|
props: {
|
|
157
|
+
disables: {
|
|
158
|
+
type: Object,
|
|
159
|
+
},
|
|
113
160
|
rules: {
|
|
114
161
|
type: Object,
|
|
115
162
|
},
|
|
@@ -117,7 +164,7 @@ export default {
|
|
|
117
164
|
type: String,
|
|
118
165
|
default: `right`,
|
|
119
166
|
},
|
|
120
|
-
|
|
167
|
+
value: {
|
|
121
168
|
type: Array,
|
|
122
169
|
require: true,
|
|
123
170
|
},
|
|
@@ -165,6 +212,14 @@ export default {
|
|
|
165
212
|
pro_formItem_skeletonVue,
|
|
166
213
|
},
|
|
167
214
|
computed: {
|
|
215
|
+
module: {
|
|
216
|
+
set(val) {
|
|
217
|
+
this.$emit("input", val);
|
|
218
|
+
},
|
|
219
|
+
get() {
|
|
220
|
+
return this.$props.value;
|
|
221
|
+
},
|
|
222
|
+
},
|
|
168
223
|
flexClass() {
|
|
169
224
|
let labelPosition = this.$props.labelPosition;
|
|
170
225
|
if (labelPosition == "top") {
|
|
@@ -176,14 +231,14 @@ export default {
|
|
|
176
231
|
|
|
177
232
|
formdata() {
|
|
178
233
|
let obj = {};
|
|
179
|
-
this
|
|
234
|
+
this.module.forEach((item) => {
|
|
180
235
|
obj[`${item.key}`] = item.value;
|
|
181
236
|
});
|
|
182
237
|
return obj;
|
|
183
238
|
},
|
|
184
239
|
|
|
185
240
|
formLineList() {
|
|
186
|
-
return ArrayChunk(this
|
|
241
|
+
return ArrayChunk(this.module, this.chunkLength);
|
|
187
242
|
},
|
|
188
243
|
},
|
|
189
244
|
methods: {
|
|
@@ -327,6 +382,18 @@ export default {
|
|
|
327
382
|
findFormItem(index, cindex) {
|
|
328
383
|
return index * this.chunkLength + cindex;
|
|
329
384
|
},
|
|
385
|
+
|
|
386
|
+
setWatcher(key) {
|
|
387
|
+
let disables = this.$props.disables;
|
|
388
|
+
if (disables) {
|
|
389
|
+
return disables[`${key}`];
|
|
390
|
+
}
|
|
391
|
+
return false;
|
|
392
|
+
},
|
|
393
|
+
|
|
394
|
+
disableWatcherResult(params) {
|
|
395
|
+
this.$emit("disableWatcherResult", params);
|
|
396
|
+
},
|
|
330
397
|
},
|
|
331
398
|
watch: {
|
|
332
399
|
chunkLength(newVal, oldVal) {
|
|
@@ -353,6 +420,33 @@ export default {
|
|
|
353
420
|
color: var(--form-label-color) !important;
|
|
354
421
|
}
|
|
355
422
|
}
|
|
423
|
+
|
|
424
|
+
.pro-form-item-content {
|
|
425
|
+
width: auto;
|
|
426
|
+
height: auto;
|
|
427
|
+
display: flex;
|
|
428
|
+
flex-flow: row wrap;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.form-skeleton-wrap {
|
|
432
|
+
width: 100%;
|
|
433
|
+
height: auto;
|
|
434
|
+
display: flex;
|
|
435
|
+
flex-flow: row wrap;
|
|
436
|
+
align-items: center;
|
|
437
|
+
justify-content: space-between;
|
|
438
|
+
}
|
|
439
|
+
/deep/.el-form {
|
|
440
|
+
width: 100%;
|
|
441
|
+
height: auto;
|
|
442
|
+
display: flex;
|
|
443
|
+
flex-flow: row wrap;
|
|
444
|
+
align-items: center;
|
|
445
|
+
justify-content: space-between;
|
|
446
|
+
}
|
|
447
|
+
/deep/ .el-form-item {
|
|
448
|
+
width: 100%;
|
|
449
|
+
}
|
|
356
450
|
/deep/ .el-form-item__content {
|
|
357
451
|
width: 100% !important;
|
|
358
452
|
box-sizing: border-box;
|
|
@@ -209,7 +209,15 @@ export default {
|
|
|
209
209
|
created() {
|
|
210
210
|
this.init();
|
|
211
211
|
},
|
|
212
|
+
mounted() {
|
|
213
|
+
this.$nextTick(() => {
|
|
214
|
+
if (this.$props.disableWatcher) {
|
|
215
|
+
// this.triggerDisable();
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
},
|
|
212
219
|
props: {
|
|
220
|
+
disableWatcher: {},
|
|
213
221
|
config: {
|
|
214
222
|
type: Object,
|
|
215
223
|
},
|
|
@@ -331,7 +339,12 @@ export default {
|
|
|
331
339
|
return this.$props.value;
|
|
332
340
|
},
|
|
333
341
|
set(val) {
|
|
342
|
+
console.log(val);
|
|
334
343
|
this.$emit("input", val);
|
|
344
|
+
console.log(this.$props.disableWatcher);
|
|
345
|
+
if (this.$props.disableWatcher) {
|
|
346
|
+
this.triggerDisable(val);
|
|
347
|
+
}
|
|
335
348
|
},
|
|
336
349
|
},
|
|
337
350
|
},
|
|
@@ -391,6 +404,19 @@ export default {
|
|
|
391
404
|
if (this.selectData.length > 0) return;
|
|
392
405
|
this.loadSelectData();
|
|
393
406
|
},
|
|
407
|
+
triggerDisable(val) {
|
|
408
|
+
let effects = this.$props.disableWatcher.effects;
|
|
409
|
+
effects.forEach((item) => {
|
|
410
|
+
let obj = {
|
|
411
|
+
key: item.key,
|
|
412
|
+
type: item.type,
|
|
413
|
+
result: item.fn(val),
|
|
414
|
+
};
|
|
415
|
+
console.log(obj);
|
|
416
|
+
|
|
417
|
+
this.$emit("disableWatcherResult", obj);
|
|
418
|
+
});
|
|
419
|
+
},
|
|
394
420
|
},
|
|
395
421
|
};
|
|
396
422
|
</script>
|
|
@@ -1123,7 +1123,7 @@
|
|
|
1123
1123
|
margin: 5px 0;
|
|
1124
1124
|
}
|
|
1125
1125
|
.el-select-dropdown.is-multiple .el-select-dropdown__item {
|
|
1126
|
-
padding-right:
|
|
1126
|
+
padding-right: 0px;
|
|
1127
1127
|
}
|
|
1128
1128
|
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
|
|
1129
1129
|
color: var(--color-primary);
|
|
@@ -1540,7 +1540,8 @@
|
|
|
1540
1540
|
border-color: #909399;
|
|
1541
1541
|
}
|
|
1542
1542
|
.el-tag.el-tag--info .el-tag__close {
|
|
1543
|
-
color:
|
|
1543
|
+
color: var(--text-black) !important;
|
|
1544
|
+
background-color: var(--text-white) !important;
|
|
1544
1545
|
}
|
|
1545
1546
|
.el-tag.el-tag--info .el-tag__close:hover {
|
|
1546
1547
|
color: var(--bg-white);
|
|
@@ -2014,20 +2015,7 @@
|
|
|
2014
2015
|
overflow: hidden;
|
|
2015
2016
|
text-overflow: ellipsis;
|
|
2016
2017
|
}
|
|
2017
|
-
|
|
2018
|
-
-webkit-box-sizing: border-box;
|
|
2019
|
-
box-sizing: border-box;
|
|
2020
|
-
border-color: transparent;
|
|
2021
|
-
margin: 2px 0 2px 6px;
|
|
2022
|
-
background-color: #f0f2f5;
|
|
2023
|
-
display: -webkit-box;
|
|
2024
|
-
display: -ms-flexbox;
|
|
2025
|
-
display: flex;
|
|
2026
|
-
max-width: 100%;
|
|
2027
|
-
-webkit-box-align: center;
|
|
2028
|
-
-ms-flex-align: center;
|
|
2029
|
-
align-items: center;
|
|
2030
|
-
}
|
|
2018
|
+
|
|
2031
2019
|
.el-select .el-tag__close.el-icon-close {
|
|
2032
2020
|
background-color: #8f959e;
|
|
2033
2021
|
top: 0;
|
|
@@ -5846,7 +5834,7 @@
|
|
|
5846
5834
|
margin: 5px 0;
|
|
5847
5835
|
}
|
|
5848
5836
|
.el-select-dropdown.is-multiple .el-select-dropdown__item {
|
|
5849
|
-
padding-right:
|
|
5837
|
+
padding-right: 0px !important;
|
|
5850
5838
|
}
|
|
5851
5839
|
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
|
|
5852
5840
|
color: var(--color-primary);
|
|
@@ -6738,7 +6726,8 @@
|
|
|
6738
6726
|
box-sizing: border-box;
|
|
6739
6727
|
border-color: transparent;
|
|
6740
6728
|
margin: 2px 0 2px 6px;
|
|
6741
|
-
|
|
6729
|
+
color: var(--text-white);
|
|
6730
|
+
background-color: var(--color-success);
|
|
6742
6731
|
display: -webkit-box;
|
|
6743
6732
|
display: -ms-flexbox;
|
|
6744
6733
|
display: flex;
|
|
@@ -14522,9 +14511,7 @@
|
|
|
14522
14511
|
.el-tag.el-tag--info.is-hit {
|
|
14523
14512
|
border-color: #909399;
|
|
14524
14513
|
}
|
|
14525
|
-
|
|
14526
|
-
color: #909399;
|
|
14527
|
-
}
|
|
14514
|
+
|
|
14528
14515
|
.el-tag.el-tag--info .el-tag__close:hover {
|
|
14529
14516
|
color: var(--bg-white);
|
|
14530
14517
|
background-color: #909399;
|
|
@@ -15248,6 +15235,8 @@
|
|
|
15248
15235
|
.el-tree-node {
|
|
15249
15236
|
white-space: nowrap;
|
|
15250
15237
|
outline: 0;
|
|
15238
|
+
margin: var(--margin-3) 0px;
|
|
15239
|
+
padding: 0px var(--padding-3);
|
|
15251
15240
|
}
|
|
15252
15241
|
.el-tree-node:focus > .el-tree-node__content {
|
|
15253
15242
|
background-color: var(--hover-gray);
|
|
@@ -20999,9 +20988,7 @@
|
|
|
20999
20988
|
.el-tag.el-tag--info.is-hit {
|
|
21000
20989
|
border-color: #909399;
|
|
21001
20990
|
}
|
|
21002
|
-
|
|
21003
|
-
color: #909399;
|
|
21004
|
-
}
|
|
20991
|
+
|
|
21005
20992
|
.el-tag.el-tag--info .el-tag__close:hover {
|
|
21006
20993
|
color: var(--bg-white);
|
|
21007
20994
|
background-color: #909399;
|