Update form.vue

This commit is contained in:
Aresn 2020-06-23 17:27:58 +08:00 committed by GitHub
parent 9d85fdcdb3
commit 8cb900097e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,6 +94,9 @@
// fields promise // fields promise
if (this.fields.length === 0) { if (this.fields.length === 0) {
resolve(valid); resolve(valid);
if (typeof callback === 'function') {
callback(valid);
}
} }
this.fields.forEach(field => { this.fields.forEach(field => {
field.validate('', errors => { field.validate('', errors => {