mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-10 06:29:46 +08:00
fix(Form): reset validate when checkbox changed
This commit is contained in:
parent
e17a4a2499
commit
494e303061
@ -63,11 +63,8 @@ export default createComponent({
|
|||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
value() {
|
value() {
|
||||||
|
this.resetValidate();
|
||||||
this.$nextTick(this.adjustSize);
|
this.$nextTick(this.adjustSize);
|
||||||
|
|
||||||
if (this.validateMessage) {
|
|
||||||
this.validateMessage = '';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -154,6 +151,12 @@ export default createComponent({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
resetValidate() {
|
||||||
|
if (this.validateMessage) {
|
||||||
|
this.validateMessage = '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
format(target = this.$refs.input) {
|
format(target = this.$refs.input) {
|
||||||
if (!target) {
|
if (!target) {
|
||||||
return;
|
return;
|
||||||
|
@ -5,6 +5,14 @@ export const FieldMixin = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
value() {
|
||||||
|
if (this.vanField) {
|
||||||
|
this.vanField.resetValidate();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
if (this.vanField) {
|
if (this.vanField) {
|
||||||
this.vanField.children = this;
|
this.vanField.children = this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user