mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-05-23 15:09:16 +08:00
feat(Field): update disabled style (#3358)
This commit is contained in:
parent
da4a5f3cd4
commit
abd0457238
@ -238,7 +238,7 @@
|
|||||||
@field-label-margin-right: @padding-sm;
|
@field-label-margin-right: @padding-sm;
|
||||||
@field-input-text-color: @text-color;
|
@field-input-text-color: @text-color;
|
||||||
@field-input-error-text-color: @red;
|
@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-placeholder-text-color: @gray-5;
|
||||||
@field-icon-size: 16px;
|
@field-icon-size: 16px;
|
||||||
@field-clear-icon-size: 16px;
|
@field-clear-icon-size: 16px;
|
||||||
@ -251,6 +251,7 @@
|
|||||||
@field-word-limit-font-size: @font-size-sm;
|
@field-word-limit-font-size: @font-size-sm;
|
||||||
@field-word-limit-line-height: 16px;
|
@field-word-limit-line-height: 16px;
|
||||||
@field-word-num-full-color: @red;
|
@field-word-num-full-color: @red;
|
||||||
|
@field-disabled-text-color: @gray-5;
|
||||||
|
|
||||||
// GoodsAction
|
// GoodsAction
|
||||||
@goods-action-background-color: @white;
|
@goods-action-background-color: @white;
|
||||||
|
@ -7,6 +7,10 @@
|
|||||||
&__label {
|
&__label {
|
||||||
.theme(color, '@field-label-color');
|
.theme(color, '@field-label-color');
|
||||||
.theme(margin-right, '@field-label-margin-right');
|
.theme(margin-right, '@field-label-margin-right');
|
||||||
|
|
||||||
|
&--disabled {
|
||||||
|
.theme(color, '@field-disabled-text-color');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__body {
|
&__body {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
title-class="label-class"
|
title-class="label-class"
|
||||||
>
|
>
|
||||||
<slot name="left-icon" slot="icon" />
|
<slot name="left-icon" slot="icon" />
|
||||||
<view wx:if="{{ label }}" class="van-field__label" slot="title">
|
<view wx:if="{{ label }}" class="{{ utils.bem('field__label', { disabled }) }}" slot="title">
|
||||||
{{ label }}
|
{{ label }}
|
||||||
</view>
|
</view>
|
||||||
<slot wx:else name="label" slot="title" />
|
<slot wx:else name="label" slot="title" />
|
||||||
@ -33,7 +33,7 @@
|
|||||||
maxlength="{{ maxlength }}"
|
maxlength="{{ maxlength }}"
|
||||||
placeholder="{{ placeholder }}"
|
placeholder="{{ placeholder }}"
|
||||||
placeholder-style="{{ placeholderStyle }}"
|
placeholder-style="{{ placeholderStyle }}"
|
||||||
placeholder-class="{{ utils.bem('field__placeholder', { error }) }}"
|
placeholder-class="{{ utils.bem('field__placeholder', { error, disabled }) }}"
|
||||||
auto-height="{{ !!autosize }}"
|
auto-height="{{ !!autosize }}"
|
||||||
style="{{ computed.inputStyle(autosize) }}"
|
style="{{ computed.inputStyle(autosize) }}"
|
||||||
cursor-spacing="{{ cursorSpacing }}"
|
cursor-spacing="{{ cursorSpacing }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user