Commit a9026606 authored by 刘晓's avatar 刘晓 Committed by hetech

Form: clearValidate supports string type param (#12990)

parent 9e6cdd78
......@@ -85,7 +85,10 @@
},
clearValidate(props = []) {
const fields = props.length
? this.fields.filter(field => props.indexOf(field.prop) > -1)
? (typeof props === 'string'
? this.fields.filter(field => props === field.prop)
: this.fields.filter(field => props.indexOf(field.prop) > -1)
)
: this.fields;
fields.forEach(field => {
field.clearValidate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment