mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-05-22 22:49: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-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;
|
||||
@ -251,6 +251,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;
|
||||
|
||||
// GoodsAction
|
||||
@goods-action-background-color: @white;
|
||||
|
@ -7,6 +7,10 @@
|
||||
&__label {
|
||||
.theme(color, '@field-label-color');
|
||||
.theme(margin-right, '@field-label-margin-right');
|
||||
|
||||
&--disabled {
|
||||
.theme(color, '@field-disabled-text-color');
|
||||
}
|
||||
}
|
||||
|
||||
&__body {
|
||||
|
@ -16,7 +16,7 @@
|
||||
title-class="label-class"
|
||||
>
|
||||
<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 }}
|
||||
</view>
|
||||
<slot wx:else name="label" slot="title" />
|
||||
@ -33,7 +33,7 @@
|
||||
maxlength="{{ maxlength }}"
|
||||
placeholder="{{ placeholder }}"
|
||||
placeholder-style="{{ placeholderStyle }}"
|
||||
placeholder-class="{{ utils.bem('field__placeholder', { error }) }}"
|
||||
placeholder-class="{{ utils.bem('field__placeholder', { error, disabled }) }}"
|
||||
auto-height="{{ !!autosize }}"
|
||||
style="{{ computed.inputStyle(autosize) }}"
|
||||
cursor-spacing="{{ cursorSpacing }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user