mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[improvement] Tab: update active style (#940)
This commit is contained in:
parent
7ad9223ace
commit
e30bd6552a
@ -9,7 +9,7 @@
|
||||
@green: #4b0;
|
||||
@gray: #c9c9c9;
|
||||
@gray-light: #e5e5e5;
|
||||
@gray-darker: #666;
|
||||
@gray-darker: #7d7e80;
|
||||
@gray-dark: #999;
|
||||
|
||||
/* default colors */
|
||||
|
@ -71,7 +71,7 @@
|
||||
height: 2px;
|
||||
position: absolute;
|
||||
background-color: @red;
|
||||
border-radius: 2px 0 2px 0;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
&--line {
|
||||
@ -98,7 +98,7 @@
|
||||
padding: 0 5px;
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
color: @text-color;
|
||||
color: @gray-darker;
|
||||
line-height: @van-tabs-line-height;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
@ -110,7 +110,8 @@
|
||||
}
|
||||
|
||||
&--active {
|
||||
color: @red;
|
||||
font-weight: 500;
|
||||
color: @text-color;
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
|
@ -14,7 +14,7 @@
|
||||
wx:key="index"
|
||||
data-index="{{ index }}"
|
||||
class="van-ellipsis van-tab {{ index === active ? 'van-tab--active' : '' }} {{ item.disabled ? 'van-tab--disabled' : '' }}"
|
||||
style="{{ color && (index === active) !== (type === 'card') && !item.disabled ? 'color: ' + color : '' }} {{ color && index === active && type === 'card' ? ';background-color:' + color : '' }} {{ color ? ';border-color: ' + color : '' }}"
|
||||
style="{{ color && index !== active && type === 'card' && !item.disabled ? 'color: ' + color : '' }} {{ color && index === active && type === 'card' ? ';background-color:' + color : '' }} {{ color ? ';border-color: ' + color : '' }}"
|
||||
bind:tap="onTap"
|
||||
>
|
||||
{{ item.title }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user