mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-25 19:06:36 +08:00
style(Field): remove word num full color (#6545)
This commit is contained in:
parent
700a0f23f7
commit
35a4b95ef2
@ -497,12 +497,10 @@ export default createComponent({
|
|||||||
genWordLimit() {
|
genWordLimit() {
|
||||||
if (this.showWordLimit && this.maxlength) {
|
if (this.showWordLimit && this.maxlength) {
|
||||||
const count = (this.value || '').length;
|
const count = (this.value || '').length;
|
||||||
const full = count >= this.maxlength;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={bem('word-limit')}>
|
<div class={bem('word-limit')}>
|
||||||
<span class={bem('word-num', { full })}>{count}</span>/
|
<span class={bem('word-num')}>{count}</span>/{this.maxlength}
|
||||||
{this.maxlength}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -151,12 +151,6 @@
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__word-num {
|
|
||||||
&--full {
|
|
||||||
color: @field-word-num-full-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&--error {
|
&--error {
|
||||||
.van-field__control {
|
.van-field__control {
|
||||||
&,
|
&,
|
||||||
|
@ -74,7 +74,7 @@ exports[`reach max word-limit 1`] = `
|
|||||||
<div class="van-cell van-field">
|
<div class="van-cell van-field">
|
||||||
<div class="van-cell__value van-cell__value--alone van-field__value">
|
<div class="van-cell__value van-cell__value--alone van-field__value">
|
||||||
<div class="van-field__body"><input type="text" class="van-field__control"></div>
|
<div class="van-field__body"><input type="text" class="van-field__control"></div>
|
||||||
<div class="van-field__word-limit"><span class="van-field__word-num van-field__word-num--full">3</span>/3</div>
|
<div class="van-field__word-limit"><span class="van-field__word-num">3</span>/3</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
@ -360,7 +360,6 @@
|
|||||||
@field-word-limit-color: @gray-7;
|
@field-word-limit-color: @gray-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-disabled-text-color: @gray-5;
|
@field-disabled-text-color: @gray-5;
|
||||||
|
|
||||||
// GridItem
|
// GridItem
|
||||||
|
Loading…
x
Reference in New Issue
Block a user