meixioacomponent 0.2.4 → 0.2.5
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 +188 -159
- package/lib/meixioacomponent.umd.js +188 -159
- package/lib/meixioacomponent.umd.min.js +4 -4
- package/package.json +1 -1
- package/packages/components/proForm/proForm/pro_form.vue +6 -0
- package/packages/components/proForm/proForm/pro_form_item.vue +63 -14
- package/packages/components/proForm/proFormWrap/pro_form_wrap.vue +5 -0
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
<pro_form_itemVue
|
|
24
24
|
:config="citem"
|
|
25
25
|
:form="form"
|
|
26
|
+
:size="size"
|
|
26
27
|
:class="[`form-item-${citem.key}`]"
|
|
27
28
|
v-if="formType == 'default' && citem.type != 'area'"
|
|
28
29
|
@formItemConfirm="formItemConfirm"
|
|
@@ -125,6 +126,11 @@ export default {
|
|
|
125
126
|
type: Number,
|
|
126
127
|
default: null,
|
|
127
128
|
},
|
|
129
|
+
|
|
130
|
+
size: {
|
|
131
|
+
type: String,
|
|
132
|
+
default: "small",
|
|
133
|
+
},
|
|
128
134
|
},
|
|
129
135
|
components: {
|
|
130
136
|
baseAreaVue,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
:class="{
|
|
4
|
+
mini: size == 'mini',
|
|
5
|
+
small: size == 'small',
|
|
4
6
|
'form-item-wrap': true,
|
|
5
7
|
disabled: config.disabled,
|
|
6
8
|
}"
|
|
@@ -49,6 +51,7 @@
|
|
|
49
51
|
<el-input
|
|
50
52
|
autosize
|
|
51
53
|
disabled
|
|
54
|
+
:size="size"
|
|
52
55
|
type="textarea"
|
|
53
56
|
v-model="module"
|
|
54
57
|
v-if="config.type == 'textarea'"
|
|
@@ -68,21 +71,21 @@
|
|
|
68
71
|
<!-- input输入框 -->
|
|
69
72
|
<el-input
|
|
70
73
|
v-if="config.type == 'input'"
|
|
71
|
-
size="
|
|
74
|
+
:size="size"
|
|
72
75
|
v-model="module"
|
|
73
76
|
style="width: 100%; height: 100%"
|
|
74
77
|
>
|
|
75
78
|
</el-input>
|
|
76
79
|
<!-- 数字类型无小数 -->
|
|
77
80
|
<el-input-number
|
|
78
|
-
size="
|
|
81
|
+
:size="size"
|
|
79
82
|
v-else-if="config.type == 'number'"
|
|
80
83
|
v-model.number="module"
|
|
81
84
|
:controls="false"
|
|
82
85
|
></el-input-number>
|
|
83
86
|
<!--数字类型两位小数 -->
|
|
84
87
|
<el-input-number
|
|
85
|
-
size="
|
|
88
|
+
:size="size"
|
|
86
89
|
:precision="2"
|
|
87
90
|
v-model.number="module"
|
|
88
91
|
:controls="false"
|
|
@@ -90,7 +93,7 @@
|
|
|
90
93
|
></el-input-number>
|
|
91
94
|
<!-- select选择器 -->
|
|
92
95
|
<el-select
|
|
93
|
-
size="
|
|
96
|
+
:size="size"
|
|
94
97
|
v-model="module"
|
|
95
98
|
placeholder="请选择"
|
|
96
99
|
:multiple="multiple"
|
|
@@ -113,7 +116,7 @@
|
|
|
113
116
|
type="date"
|
|
114
117
|
align="right"
|
|
115
118
|
v-model="module"
|
|
116
|
-
size="
|
|
119
|
+
:size="size"
|
|
117
120
|
placeholder="选择日期"
|
|
118
121
|
value-format="timestamp"
|
|
119
122
|
:prefix-icon="`el-icon-time`"
|
|
@@ -137,6 +140,7 @@
|
|
|
137
140
|
</el-radio-group>
|
|
138
141
|
<!-- 选择器 -->
|
|
139
142
|
<el-checkbox-group
|
|
143
|
+
:size="size"
|
|
140
144
|
:min="checkMin"
|
|
141
145
|
:max="checkMax"
|
|
142
146
|
v-model="module"
|
|
@@ -153,6 +157,7 @@
|
|
|
153
157
|
<!-- 文本输入框 -->
|
|
154
158
|
<el-input
|
|
155
159
|
autosize
|
|
160
|
+
:size="size"
|
|
156
161
|
type="textarea"
|
|
157
162
|
v-model="module"
|
|
158
163
|
v-if="config.type == 'textarea'"
|
|
@@ -208,6 +213,11 @@ export default {
|
|
|
208
213
|
},
|
|
209
214
|
|
|
210
215
|
value: {},
|
|
216
|
+
|
|
217
|
+
size: {
|
|
218
|
+
type: String,
|
|
219
|
+
default: "small",
|
|
220
|
+
},
|
|
211
221
|
},
|
|
212
222
|
|
|
213
223
|
computed: {
|
|
@@ -248,10 +258,14 @@ export default {
|
|
|
248
258
|
let list = this.selectData;
|
|
249
259
|
if (list.length > 0) {
|
|
250
260
|
if (!this.multiple) {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
261
|
+
if (this.module) {
|
|
262
|
+
let index = list.findIndex((item) => {
|
|
263
|
+
return item.value == this.module;
|
|
264
|
+
});
|
|
265
|
+
return list[index].label;
|
|
266
|
+
} else {
|
|
267
|
+
return "暂无数据";
|
|
268
|
+
}
|
|
255
269
|
} else {
|
|
256
270
|
let text = "";
|
|
257
271
|
this.module.forEach((item) => {
|
|
@@ -269,9 +283,14 @@ export default {
|
|
|
269
283
|
}
|
|
270
284
|
|
|
271
285
|
case "time":
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
286
|
+
if (this.module) {
|
|
287
|
+
let config = this.$props.config;
|
|
288
|
+
let format = config.format ? config.format : "YYYY-MM-DD";
|
|
289
|
+
return FilterTime(this.module, format);
|
|
290
|
+
} else {
|
|
291
|
+
return "暂无时间";
|
|
292
|
+
}
|
|
293
|
+
|
|
275
294
|
default:
|
|
276
295
|
return this.module;
|
|
277
296
|
}
|
|
@@ -363,7 +382,6 @@ export default {
|
|
|
363
382
|
border-radius: calc(var(--radius) * 2);
|
|
364
383
|
.item-content {
|
|
365
384
|
display: flex;
|
|
366
|
-
min-height: 32px;
|
|
367
385
|
align-items: center;
|
|
368
386
|
flex-flow: row nowrap;
|
|
369
387
|
box-sizing: border-box;
|
|
@@ -409,7 +427,6 @@ export default {
|
|
|
409
427
|
}
|
|
410
428
|
.item-handle-wrap {
|
|
411
429
|
width: 100%;
|
|
412
|
-
min-height: 32px;
|
|
413
430
|
border-radius: inherit;
|
|
414
431
|
/deep/ .el-input__inner {
|
|
415
432
|
font-weight: var(--font-weight-kg) !important;
|
|
@@ -455,4 +472,36 @@ export default {
|
|
|
455
472
|
color: var(--font-color-ds) !important;
|
|
456
473
|
}
|
|
457
474
|
}
|
|
475
|
+
.small {
|
|
476
|
+
.item-content {
|
|
477
|
+
min-height: 32px;
|
|
478
|
+
}
|
|
479
|
+
.item-handle-wrap {
|
|
480
|
+
min-height: 32px;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
.mini {
|
|
484
|
+
/deep/ .el-form-item {
|
|
485
|
+
margin-bottom: var(--margin-5);
|
|
486
|
+
}
|
|
487
|
+
/deep/ .el-form-item__label {
|
|
488
|
+
line-height: 28px !important;
|
|
489
|
+
}
|
|
490
|
+
/deep/ .item-label {
|
|
491
|
+
font-size: var(--font-size-s) !important;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.item-content {
|
|
495
|
+
min-height: 24px;
|
|
496
|
+
max-height: 24px;
|
|
497
|
+
/deep/ .base-icon-wrap {
|
|
498
|
+
width: 20px !important;
|
|
499
|
+
height: 20px !important;
|
|
500
|
+
visibility: hidden;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
.item-handle-wrap {
|
|
504
|
+
min-height: 24px;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
458
507
|
</style>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
<base-icon :name="iconClass" :size="`l`" slot="header-prefix"></base-icon>
|
|
5
5
|
<template slot="sectionContent">
|
|
6
6
|
<pro_formVue
|
|
7
|
+
:size="size"
|
|
7
8
|
ref="proForm"
|
|
8
9
|
:form="false"
|
|
9
10
|
:rules="rules"
|
|
@@ -49,6 +50,10 @@ export default {
|
|
|
49
50
|
type: Number,
|
|
50
51
|
default: null,
|
|
51
52
|
},
|
|
53
|
+
size: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "small",
|
|
56
|
+
},
|
|
52
57
|
},
|
|
53
58
|
computed: {
|
|
54
59
|
iconClass() {
|