mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[new feature] Tabbar: add border prop (#1649)
This commit is contained in:
parent
58babaf146
commit
3a8e6f4ab6
@ -118,6 +118,7 @@ Page({
|
||||
| active | 当前选中标签的索引 | `Number` | - |
|
||||
| active-color | 选中标签的颜色 | `String` | `#1989fa` |
|
||||
| fixed | 是否固定在底部 | `Boolean` | `true` |
|
||||
| border | 是否展示外边框 | `Boolean` | `true` |
|
||||
| z-index | 元素 z-index | `Number` | `1` |
|
||||
| safe-area-inset-bottom | 是否为iPhoneX留出底部安全距离 | `Boolean` | `true` |
|
||||
|
||||
|
@ -26,6 +26,10 @@ VantComponent({
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
border: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
zIndex: {
|
||||
type: Number,
|
||||
value: 1
|
||||
|
@ -1,7 +1,7 @@
|
||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||
|
||||
<view
|
||||
class="custom-class van-hairline--top-bottom {{ utils.bem('tabbar', { fixed, safe: isIPhoneX && safeAreaInsetBottom }) }}"
|
||||
class="custom-class {{ border ? 'van-hairline--top-bottom' : '' }} {{ utils.bem('tabbar', { fixed, safe: isIPhoneX && safeAreaInsetBottom }) }}"
|
||||
style="{{ zIndex ? 'z-index: ' + zIndex : '' }}"
|
||||
>
|
||||
<slot />
|
||||
|
Loading…
x
Reference in New Issue
Block a user