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 (#6382)
This commit is contained in:
parent
8db218e9c0
commit
126f2124a2
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user