bri-components 1.4.39 → 1.4.40
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/package.json
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
:span="formItem._br ? 24 : (formItem._span || 24)"
|
|
18
18
|
>
|
|
19
19
|
<FormItem
|
|
20
|
+
v-if="hideMap[formItem._key] !== true"
|
|
20
21
|
class="DshForm-item-FormItem"
|
|
21
22
|
:prop="formItem._key"
|
|
22
23
|
@click.native="clickControl(formItem)"
|
|
@@ -192,6 +193,7 @@
|
|
|
192
193
|
data () {
|
|
193
194
|
return {
|
|
194
195
|
rules: {},
|
|
196
|
+
hideMap: {},
|
|
195
197
|
errorObj: {
|
|
196
198
|
errors: []
|
|
197
199
|
},
|
|
@@ -277,6 +279,17 @@
|
|
|
277
279
|
|
|
278
280
|
return bool;
|
|
279
281
|
},
|
|
282
|
+
// 强制校验,动态校验切换时-单选多选的校验文字无法消失
|
|
283
|
+
forceValidateField (formItem) {
|
|
284
|
+
if (["select", "checkbox"].includes(formItem._type) && !this.rules[formItem._key].length) {
|
|
285
|
+
this.$set(this.hideMap, formItem._key, true);
|
|
286
|
+
this.$nextTick(() => {
|
|
287
|
+
this.$set(this.hideMap, formItem._key, false);
|
|
288
|
+
});
|
|
289
|
+
} else {
|
|
290
|
+
this.$refs.form.validateField(formItem._key);
|
|
291
|
+
}
|
|
292
|
+
},
|
|
280
293
|
|
|
281
294
|
// 控件自己的校验
|
|
282
295
|
selfValidate (cb) {
|