Update form.vue
This commit is contained in:
parent
9d85fdcdb3
commit
8cb900097e
1 changed files with 3 additions and 0 deletions
|
@ -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 => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue