mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[new feature] Tab : support custom color (#1622)
This commit is contained in:
parent
8aa394b3e5
commit
cf9ffa24d0
@ -146,6 +146,7 @@ In swipeable mode, you can switch tabs with swipe gestrue in the content
|
||||
| sticky | Whether to use sticky mode | `Boolean` | `false` |
|
||||
| offset-top | Offset top when use sticky mode | `Number` | `0` |
|
||||
| swipeable | Whether to switch tabs with swipe gestrue in the content | `Boolean` | `false` |
|
||||
| color | Set tab's title color | `String` | - |
|
||||
|
||||
### Tab API
|
||||
|
||||
|
@ -148,6 +148,7 @@ export default {
|
||||
| sticky | 是否使用粘性定位布局 | `Boolean` | `false` |
|
||||
| offset-top | 粘性定位布局下与顶部的最小距离 (px) | `Number` | `0` |
|
||||
| swipeable | 是否可以滑动内容切换 | `Boolean` | `false` |
|
||||
| color | 设置 tab 标题的颜色 | `String` | - |
|
||||
|
||||
### Tab API
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
'van-tab--active': index === curActive,
|
||||
'van-tab--disabled': tab.disabled
|
||||
}"
|
||||
:style="{ color }"
|
||||
@click="onClick(index)"
|
||||
>
|
||||
<span class="van-ellipsis" ref="title">{{ tab.title }}</span>
|
||||
@ -69,7 +70,8 @@ export default create({
|
||||
offsetTop: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
color: String
|
||||
},
|
||||
|
||||
data() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user