style(Field): update disabled color (#6534)

This commit is contained in:
neverland 2020-06-13 13:23:15 +08:00 committed by GitHub
parent 7788822dba
commit f545a47047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 3 deletions

View File

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

View File

@ -1,6 +1,10 @@
@import '../style/var';
.van-field {
&--disabled {
color: @field-disabled-text-color;
}
&__label {
flex: none;
box-sizing: border-box;

View File

@ -51,7 +51,7 @@ exports[`renders demo correctly 1`] = `
<div class="van-field__body"><input type="text" readonly="readonly" class="van-field__control"></div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell van-field van-field--disabled">
<div class="van-cell__title van-field__label"><span>文本</span></div>
<div class="van-cell__value van-field__value">
<div class="van-field__body"><input type="text" disabled="disabled" class="van-field__control"></div>

View File

@ -47,7 +47,7 @@ exports[`renders demo correctly 1`] = `
<div>
<div class="van-search">
<div class="van-search__content van-search__content--square">
<div class="van-cell van-cell--borderless van-field">
<div class="van-cell van-cell--borderless van-field van-field--disabled">
<div class="van-field__left-icon"><i class="van-icon van-icon-search">
<!----></i></div>
<div class="van-cell__value van-cell__value--alone van-field__value">

View File

@ -348,7 +348,7 @@
@field-label-width: 90px;
@field-input-text-color: @text-color;
@field-input-error-text-color: @red;
@field-input-disabled-text-color: @gray-6;
@field-input-disabled-text-color: @gray-5;
@field-placeholder-text-color: @gray-5;
@field-icon-size: 16px;
@field-clear-icon-size: 16px;
@ -361,6 +361,7 @@
@field-word-limit-font-size: @font-size-sm;
@field-word-limit-line-height: 16px;
@field-word-num-full-color: @red;
@field-disabled-text-color: @gray-5;
// GridItem
@grid-item-content-padding: @padding-md @padding-xs;