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,
default: true
},
size: String
size: String,
validateOnRuleChange: {
type: Boolean,
default: true
}
},
watch: {
rules() {
this.validate();
if (this.validateOnRuleChange) {
this.validate(() => {});
}
}
},
data() {