mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[new feature]: Tab 新增 z-index 属性 (#695)
This commit is contained in:
parent
8e003a0ee7
commit
038f835fa6
@ -117,6 +117,7 @@ Page({
|
||||
|-----------|-----------|-----------|-------------|
|
||||
| active | 当前激活标签的索引 | `Number` | `0` |
|
||||
| color | 标签颜色 | `String` | `#f44` |
|
||||
| z-index | z-index 层级 | `Number` | 99 |
|
||||
| type | 样式风格,可选值为`card` | `String` | `line` |
|
||||
| border | 是否展示外边框,仅在`line`风格下生效 | `Boolean` | `true` |
|
||||
| duration | 动画时间 (单位秒) | `Number` | `0.2` |
|
||||
|
@ -11,7 +11,6 @@
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
position: absolute;
|
||||
|
||||
&--page-top {
|
||||
|
@ -45,6 +45,10 @@ VantComponent({
|
||||
type: Number,
|
||||
value: 0.2
|
||||
},
|
||||
zIndex: {
|
||||
type: Number,
|
||||
value: 99
|
||||
},
|
||||
swipeThreshold: {
|
||||
type: Number,
|
||||
value: 4
|
||||
|
@ -1,5 +1,5 @@
|
||||
<view class="custom-class van-tabs van-tabs--{{ type }}">
|
||||
<view class="van-tabs__wrap {{ scrollable ? 'van-tabs__wrap--scrollable' : '' }} {{ type === 'line' && border ? 'van-hairline--top-bottom' : '' }}">
|
||||
<view style="z-index: {{ zIndex }}" class="van-tabs__wrap {{ scrollable ? 'van-tabs__wrap--scrollable' : '' }} {{ type === 'line' && border ? 'van-hairline--top-bottom' : '' }}">
|
||||
<scroll-view
|
||||
scroll-x="{{ scrollable }}"
|
||||
scroll-with-animation
|
||||
|
Loading…
x
Reference in New Issue
Block a user