mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Field): incorrect placeholder color when error and disabled (#4666)
This commit is contained in:
parent
a18a9c5701
commit
4fadffa50a
@ -288,7 +288,6 @@ export default createComponent({
|
|||||||
arrowDirection={this.arrowDirection}
|
arrowDirection={this.arrowDirection}
|
||||||
class={bem({
|
class={bem({
|
||||||
error: this.error,
|
error: this.error,
|
||||||
disabled: this.$attrs.disabled,
|
|
||||||
[`label-${labelAlign}`]: labelAlign,
|
[`label-${labelAlign}`]: labelAlign,
|
||||||
'min-height': this.type === 'textarea' && !this.autosize
|
'min-height': this.type === 'textarea' && !this.autosize
|
||||||
})}
|
})}
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
&:disabled {
|
&:disabled {
|
||||||
color: @field-input-disabled-text-color;
|
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;
|
background-color: transparent;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
@ -117,17 +117,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--disabled {
|
|
||||||
.van-field__control {
|
|
||||||
color: @field-input-disabled-text-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&--error {
|
&--error {
|
||||||
.van-field__control {
|
.van-field__control {
|
||||||
&,
|
&,
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
color: @field-input-error-text-color;
|
color: @field-input-error-text-color;
|
||||||
|
-webkit-text-fill-color: @field-input-error-text-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user