mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(Form): add resetValidation method
This commit is contained in:
parent
f204a9871a
commit
8e9e0af17d
@ -67,6 +67,13 @@ export default createComponent({
|
|||||||
return this.validateFirst ? this.validateSeq() : this.validateAll();
|
return this.validateFirst ? this.validateSeq() : this.validateAll();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// @exposed-api
|
||||||
|
resetValidation() {
|
||||||
|
this.fields.forEach(item => {
|
||||||
|
item.resetValidation();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
getValues() {
|
getValues() {
|
||||||
return this.fields.reduce((form, field) => {
|
return this.fields.reduce((form, field) => {
|
||||||
form[field.name] = field.formValue;
|
form[field.name] = field.formValue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user