1
0
mirror of https://gitee.com/vant-contrib/vant.git synced 2025-04-06 03:57:59 +08:00

fix(Field): can not disable error in form ()

This commit is contained in:
neverland 2020-05-26 19:41:00 +08:00 committed by GitHub
parent 8db218e9c0
commit 126f2124a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -37,7 +37,6 @@ export default createComponent({
...cellProps,
name: String,
rules: Array,
error: Boolean,
disabled: Boolean,
readonly: Boolean,
autosize: [Boolean, Object],
@ -58,6 +57,10 @@ export default createComponent({
type: String,
default: 'text',
},
error: {
type: Boolean,
default: null,
},
colon: {
type: Boolean,
default: null,
@ -106,10 +109,12 @@ export default createComponent({
},
showError() {
if (this.error !== null) {
return this.error;
}
if (this.vanForm && this.vanForm.showError && this.validateMessage) {
return true;
}
return this.error;
},
listeners() {