[new feature]: Tab 新增 z-index 属性 (#695)

This commit is contained in:
刘建东 2018-10-08 14:29:41 +08:00 committed by neverland
parent 8e003a0ee7
commit 038f835fa6
4 changed files with 6 additions and 2 deletions

View File

@ -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` |

View File

@ -11,7 +11,6 @@
top: 0;
left: 0;
right: 0;
z-index: 99;
position: absolute;
&--page-top {

View File

@ -45,6 +45,10 @@ VantComponent({
type: Number,
value: 0.2
},
zIndex: {
type: Number,
value: 99
},
swipeThreshold: {
type: Number,
value: 4

View File

@ -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