mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-07 13:09:45 +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: {
|
||||
value() {
|
||||
this.resetValidate();
|
||||
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) {
|
||||
if (!target) {
|
||||
return;
|
||||
|
@ -5,6 +5,14 @@ export const FieldMixin = {
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
value() {
|
||||
if (this.vanField) {
|
||||
this.vanField.resetValidate();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
created() {
|
||||
if (this.vanField) {
|
||||
this.vanField.children = this;
|
||||
|
Loading…
x
Reference in New Issue
Block a user