mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[bugfix] Tab: color prop not work when use card type (#520)
This commit is contained in:
parent
24c964db8f
commit
39f8c5c5e8
4
dist/tabs/index.wxml
vendored
4
dist/tabs/index.wxml
vendored
@ -5,14 +5,14 @@
|
|||||||
scroll-with-animation
|
scroll-with-animation
|
||||||
scroll-left="{{ scrollLeft }}"
|
scroll-left="{{ scrollLeft }}"
|
||||||
>
|
>
|
||||||
<view class="van-tabs__nav van-tabs__nav--{{ type }}">
|
<view class="van-tabs__nav van-tabs__nav--{{ type }}" style="{{ color ? 'border-color: ' + color : '' }}">
|
||||||
<view wx:if="{{ type === 'line' }}" class="van-tabs__line" style="{{ lineStyle }}" />
|
<view wx:if="{{ type === 'line' }}" class="van-tabs__line" style="{{ lineStyle }}" />
|
||||||
<view
|
<view
|
||||||
wx:for="{{ tabs }}"
|
wx:for="{{ tabs }}"
|
||||||
wx:key="index"
|
wx:key="index"
|
||||||
data-index="{{ index }}"
|
data-index="{{ index }}"
|
||||||
class="van-tab {{ index === active ? 'van-tab--active' : '' }} {{ item.data.disabled ? 'van-tab--disabled' : '' }}"
|
class="van-tab {{ index === active ? 'van-tab--active' : '' }} {{ item.data.disabled ? 'van-tab--disabled' : '' }}"
|
||||||
style="{{ color ? 'color: ' + color : '' }}"
|
style="{{ color && !(index === active && type === 'card') && !item.data.disabled ? 'color: ' + color : '' }} {{ color && index === active && type === 'card' ? ';background-color:' + color : '' }} {{ color ? ';border-color: ' + color : '' }}"
|
||||||
bind:tap="onTap"
|
bind:tap="onTap"
|
||||||
>
|
>
|
||||||
<view class="van-ellipsis">{{ item.data.title }}</view>
|
<view class="van-ellipsis">{{ item.data.title }}</view>
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
scroll-with-animation
|
scroll-with-animation
|
||||||
scroll-left="{{ scrollLeft }}"
|
scroll-left="{{ scrollLeft }}"
|
||||||
>
|
>
|
||||||
<view class="van-tabs__nav van-tabs__nav--{{ type }}">
|
<view class="van-tabs__nav van-tabs__nav--{{ type }}" style="{{ color ? 'border-color: ' + color : '' }}">
|
||||||
<view wx:if="{{ type === 'line' }}" class="van-tabs__line" style="{{ lineStyle }}" />
|
<view wx:if="{{ type === 'line' }}" class="van-tabs__line" style="{{ lineStyle }}" />
|
||||||
<view
|
<view
|
||||||
wx:for="{{ tabs }}"
|
wx:for="{{ tabs }}"
|
||||||
wx:key="index"
|
wx:key="index"
|
||||||
data-index="{{ index }}"
|
data-index="{{ index }}"
|
||||||
class="van-tab {{ index === active ? 'van-tab--active' : '' }} {{ item.data.disabled ? 'van-tab--disabled' : '' }}"
|
class="van-tab {{ index === active ? 'van-tab--active' : '' }} {{ item.data.disabled ? 'van-tab--disabled' : '' }}"
|
||||||
style="{{ color ? 'color: ' + color : '' }}"
|
style="{{ color && !(index === active && type === 'card') && !item.data.disabled ? 'color: ' + color : '' }} {{ color && index === active && type === 'card' ? ';background-color:' + color : '' }} {{ color ? ';border-color: ' + color : '' }}"
|
||||||
bind:tap="onTap"
|
bind:tap="onTap"
|
||||||
>
|
>
|
||||||
<view class="van-ellipsis">{{ item.data.title }}</view>
|
<view class="van-ellipsis">{{ item.data.title }}</view>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user