Form: add validateOnRuleChange (#8141)

pull/9529/head
badpunman 2018-01-29 09:41:53 +02:00 committed by 杨奕
parent 840c4b57be
commit c1fbffe051
1 changed files with 8 additions and 2 deletions

View File

@ -34,11 +34,17 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
size: String size: String,
validateOnRuleChange: {
type: Boolean,
default: true
}
}, },
watch: { watch: {
rules() { rules() {
this.validate(); if (this.validateOnRuleChange) {
this.validate(() => {});
}
} }
}, },
data() { data() {