fix(Field): incorrect placeholder color when error and disabled (#4666)

This commit is contained in:
neverland 2019-10-09 16:32:35 +08:00 committed by GitHub
parent a18a9c5701
commit 4fadffa50a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 8 deletions

View File

@ -288,7 +288,6 @@ export default createComponent({
arrowDirection={this.arrowDirection}
class={bem({
error: this.error,
disabled: this.$attrs.disabled,
[`label-${labelAlign}`]: labelAlign,
'min-height': this.type === 'textarea' && !this.autosize
})}

View File

@ -38,7 +38,7 @@
&:disabled {
color: @field-input-disabled-text-color;
-webkit-text-fill-color: @field-input-disabled-text-color;
-webkit-text-fill-color: @field-input-disabled-text-color; // fix disabled color in iOS
background-color: transparent;
opacity: 1;
}
@ -117,17 +117,12 @@
}
}
&--disabled {
.van-field__control {
color: @field-input-disabled-text-color;
}
}
&--error {
.van-field__control {
&,
&::placeholder {
color: @field-input-error-text-color;
-webkit-text-fill-color: @field-input-error-text-color;
}
}
}