meixioacomponent 0.2.31 → 0.2.35
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 +759 -304
- package/lib/meixioacomponent.umd.js +759 -304
- 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/baseDialog/index.vue +6 -1
- package/packages/components/base/basePopoverButton/index.vue +4 -0
- 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 +80 -7
- package/packages/components/proForm/proForm/pro_form-item_skeleton.vue +2 -2
- package/packages/components/proForm/proForm/pro_form.vue +85 -40
- package/packages/components/proForm/proForm/pro_form_item.vue +26 -0
- package/packages/components/style/element/index.css +11 -24
|
@@ -9,55 +9,55 @@
|
|
|
9
9
|
:label-position="labelPosition"
|
|
10
10
|
>
|
|
11
11
|
<div
|
|
12
|
-
:key="
|
|
13
|
-
|
|
14
|
-
v-
|
|
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}`]"
|
|
15
17
|
>
|
|
16
18
|
<el-form-item
|
|
17
|
-
:
|
|
18
|
-
:
|
|
19
|
-
:
|
|
20
|
-
v-for="(citem, cindex) in item"
|
|
21
|
-
:class="[`chunk-${chunkLength}`, `${flexClass}`, size]"
|
|
19
|
+
:prop="item.key"
|
|
20
|
+
:label="item.label"
|
|
21
|
+
:class="[`${flexClass}`, size]"
|
|
22
22
|
>
|
|
23
|
-
<span slot="label" class="item-label">{{
|
|
23
|
+
<span slot="label" class="item-label">{{ item.label }}</span>
|
|
24
24
|
<pro_form_itemVue
|
|
25
|
-
:config="citem"
|
|
26
25
|
:form="form"
|
|
27
26
|
:size="size"
|
|
28
|
-
:
|
|
29
|
-
|
|
27
|
+
:config="item"
|
|
28
|
+
:class="[`form-item-${item.key}`]"
|
|
30
29
|
@formItemConfirm="formItemConfirm"
|
|
31
|
-
@
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
v-model="
|
|
30
|
+
@disableWatcherResult="disableWatcherResult"
|
|
31
|
+
:disableWatcher="setWatcher(item.key)"
|
|
32
|
+
v-if="formType == 'default' && item.type != 'area'"
|
|
33
|
+
v-model="item.value"
|
|
35
34
|
>
|
|
36
|
-
<template slot="template" v-if="
|
|
37
|
-
<slot :name="`form-${
|
|
35
|
+
<template slot="template" v-if="item.type == 'template'">
|
|
36
|
+
<slot :name="`form-${item.key}`" :scope="module"></slot>
|
|
38
37
|
</template>
|
|
39
38
|
</pro_form_itemVue>
|
|
40
39
|
<baseAreaVue
|
|
41
|
-
:disable="
|
|
42
|
-
v-if="
|
|
43
|
-
:ref="`area-${
|
|
44
|
-
v-model="
|
|
45
|
-
:class="[`form-item-${
|
|
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}`]"
|
|
46
45
|
@confirmAreaValue="
|
|
47
46
|
formItemConfirm({
|
|
48
|
-
config:
|
|
47
|
+
config: item,
|
|
49
48
|
})
|
|
50
49
|
"
|
|
51
50
|
></baseAreaVue>
|
|
52
51
|
<baseUploadVue
|
|
53
52
|
:max="formConfig.max"
|
|
54
53
|
v-if="formType == `upload`"
|
|
55
|
-
v-model="
|
|
56
|
-
:class="[`form-item-${
|
|
54
|
+
v-model="item.value"
|
|
55
|
+
:class="[`form-item-${item.key}`]"
|
|
57
56
|
></baseUploadVue>
|
|
58
57
|
</el-form-item>
|
|
59
58
|
</div>
|
|
60
59
|
|
|
60
|
+
|
|
61
61
|
<baseButtonHandleVue
|
|
62
62
|
v-if="footer"
|
|
63
63
|
:align="`end`"
|
|
@@ -69,18 +69,12 @@
|
|
|
69
69
|
|
|
70
70
|
<div class="form-skeleton-wrap" v-else>
|
|
71
71
|
<div
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
v-for="
|
|
72
|
+
class="form-skeleton-item-wrap"
|
|
73
|
+
:key="item.key"
|
|
74
|
+
v-for="item in module"
|
|
75
|
+
:class="[`chunk-${chunkLength}`, `${flexClass}`, size]"
|
|
75
76
|
>
|
|
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>
|
|
77
|
+
<pro_formItem_skeletonVue></pro_formItem_skeletonVue>
|
|
84
78
|
</div>
|
|
85
79
|
</div>
|
|
86
80
|
</div>
|
|
@@ -107,9 +101,13 @@ export default {
|
|
|
107
101
|
mounted() {
|
|
108
102
|
this.$nextTick(() => {
|
|
109
103
|
this.init();
|
|
104
|
+
console.log(this.module);
|
|
110
105
|
});
|
|
111
106
|
},
|
|
112
107
|
props: {
|
|
108
|
+
disables: {
|
|
109
|
+
type: Object,
|
|
110
|
+
},
|
|
113
111
|
rules: {
|
|
114
112
|
type: Object,
|
|
115
113
|
},
|
|
@@ -117,7 +115,7 @@ export default {
|
|
|
117
115
|
type: String,
|
|
118
116
|
default: `right`,
|
|
119
117
|
},
|
|
120
|
-
|
|
118
|
+
value: {
|
|
121
119
|
type: Array,
|
|
122
120
|
require: true,
|
|
123
121
|
},
|
|
@@ -165,6 +163,14 @@ export default {
|
|
|
165
163
|
pro_formItem_skeletonVue,
|
|
166
164
|
},
|
|
167
165
|
computed: {
|
|
166
|
+
module: {
|
|
167
|
+
set(val) {
|
|
168
|
+
this.$emit("input", val);
|
|
169
|
+
},
|
|
170
|
+
get() {
|
|
171
|
+
return this.$props.value;
|
|
172
|
+
},
|
|
173
|
+
},
|
|
168
174
|
flexClass() {
|
|
169
175
|
let labelPosition = this.$props.labelPosition;
|
|
170
176
|
if (labelPosition == "top") {
|
|
@@ -176,14 +182,14 @@ export default {
|
|
|
176
182
|
|
|
177
183
|
formdata() {
|
|
178
184
|
let obj = {};
|
|
179
|
-
this
|
|
185
|
+
this.module.forEach((item) => {
|
|
180
186
|
obj[`${item.key}`] = item.value;
|
|
181
187
|
});
|
|
182
188
|
return obj;
|
|
183
189
|
},
|
|
184
190
|
|
|
185
191
|
formLineList() {
|
|
186
|
-
return ArrayChunk(this
|
|
192
|
+
return ArrayChunk(this.module, this.chunkLength);
|
|
187
193
|
},
|
|
188
194
|
},
|
|
189
195
|
methods: {
|
|
@@ -327,6 +333,18 @@ export default {
|
|
|
327
333
|
findFormItem(index, cindex) {
|
|
328
334
|
return index * this.chunkLength + cindex;
|
|
329
335
|
},
|
|
336
|
+
|
|
337
|
+
setWatcher(key) {
|
|
338
|
+
let disables = this.$props.disables;
|
|
339
|
+
if (disables) {
|
|
340
|
+
return disables[`${key}`];
|
|
341
|
+
}
|
|
342
|
+
return false;
|
|
343
|
+
},
|
|
344
|
+
|
|
345
|
+
disableWatcherResult(params) {
|
|
346
|
+
this.$emit("disableWatcherResult", params);
|
|
347
|
+
},
|
|
330
348
|
},
|
|
331
349
|
watch: {
|
|
332
350
|
chunkLength(newVal, oldVal) {
|
|
@@ -353,6 +371,33 @@ export default {
|
|
|
353
371
|
color: var(--form-label-color) !important;
|
|
354
372
|
}
|
|
355
373
|
}
|
|
374
|
+
|
|
375
|
+
.pro-form-item-content {
|
|
376
|
+
width: auto;
|
|
377
|
+
height: auto;
|
|
378
|
+
display: flex;
|
|
379
|
+
flex-flow: row wrap;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.form-skeleton-wrap {
|
|
383
|
+
width: 100%;
|
|
384
|
+
height: auto;
|
|
385
|
+
display: flex;
|
|
386
|
+
flex-flow: row wrap;
|
|
387
|
+
align-items: center;
|
|
388
|
+
justify-content: space-between;
|
|
389
|
+
}
|
|
390
|
+
/deep/.el-form {
|
|
391
|
+
width: 100%;
|
|
392
|
+
height: auto;
|
|
393
|
+
display: flex;
|
|
394
|
+
flex-flow: row wrap;
|
|
395
|
+
align-items: center;
|
|
396
|
+
justify-content: space-between;
|
|
397
|
+
}
|
|
398
|
+
/deep/ .el-form-item {
|
|
399
|
+
width: 100%;
|
|
400
|
+
}
|
|
356
401
|
/deep/ .el-form-item__content {
|
|
357
402
|
width: 100% !important;
|
|
358
403
|
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;
|