meixioacomponent 0.2.3 → 0.2.4
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 +186 -164
- package/lib/meixioacomponent.umd.js +186 -164
- package/lib/meixioacomponent.umd.min.js +5 -5
- package/package.json +1 -1
- package/packages/components/proForm/proForm/pro_form.vue +29 -14
- package/packages/components/proForm/proForm/pro_form_item.vue +1 -1
- package/packages/components/proForm/proFormWrap/pro_form_wrap.vue +5 -0
package/package.json
CHANGED
|
@@ -120,6 +120,11 @@ export default {
|
|
|
120
120
|
type: Object,
|
|
121
121
|
require: true,
|
|
122
122
|
},
|
|
123
|
+
|
|
124
|
+
rowNumber: {
|
|
125
|
+
type: Number,
|
|
126
|
+
default: null,
|
|
127
|
+
},
|
|
123
128
|
},
|
|
124
129
|
components: {
|
|
125
130
|
baseAreaVue,
|
|
@@ -160,6 +165,11 @@ export default {
|
|
|
160
165
|
];
|
|
161
166
|
}
|
|
162
167
|
|
|
168
|
+
if (this.$props.rowNumber) {
|
|
169
|
+
this.chunkLength = this.$props.rowNumber;
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
|
|
163
173
|
let width = this.$refs.proFormWrap.clientWidth;
|
|
164
174
|
if (this.$props.formType != "default") {
|
|
165
175
|
this.chunkLength = 1;
|
|
@@ -169,24 +179,29 @@ export default {
|
|
|
169
179
|
this.chunkLength = 2;
|
|
170
180
|
return;
|
|
171
181
|
}
|
|
172
|
-
|
|
173
182
|
this.chunkLength = 3;
|
|
174
183
|
},
|
|
175
184
|
formItemConfirm(params) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
if (this.$props.rules) {
|
|
186
|
+
// element 验证单条表单修改
|
|
187
|
+
const rulesItem = this.$props.rules[params.config.key];
|
|
188
|
+
if (rulesItem) {
|
|
189
|
+
this.$refs.form.validateField(
|
|
190
|
+
[`${params.config.key}`],
|
|
191
|
+
(errorMsg) => {
|
|
192
|
+
//console.log(errorMsg);
|
|
193
|
+
if (!errorMsg) {
|
|
194
|
+
params.this.handleConfirm();
|
|
195
|
+
this.$emit("formItemConfirm", params.config);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
return;
|
|
189
202
|
}
|
|
203
|
+
params.this.handleConfirm();
|
|
204
|
+
this.$emit("formItemConfirm", params.config);
|
|
190
205
|
},
|
|
191
206
|
setFormData() {
|
|
192
207
|
this.formdata = {};
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
:rules="rules"
|
|
10
10
|
:footer="false"
|
|
11
11
|
:formList="formList"
|
|
12
|
+
:rowNumber="rowNumber"
|
|
12
13
|
:labelWidth="labelWidth"
|
|
13
14
|
@formItemConfirm="formItemConfirm"
|
|
14
15
|
></pro_formVue> </template
|
|
@@ -44,6 +45,10 @@ export default {
|
|
|
44
45
|
rules: {
|
|
45
46
|
type: Object,
|
|
46
47
|
},
|
|
48
|
+
rowNumber: {
|
|
49
|
+
type: Number,
|
|
50
|
+
default: null,
|
|
51
|
+
},
|
|
47
52
|
},
|
|
48
53
|
computed: {
|
|
49
54
|
iconClass() {
|