mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[new feature] NavBar: add border prop (#960)
This commit is contained in:
parent
f0802e76c8
commit
162982f0a7
@ -56,6 +56,7 @@ export default {
|
||||
| right-text | 右侧文案 | `String` | `''` |
|
||||
| left-arrow | 是否显示左侧箭头 | `Boolean` | `false` |
|
||||
| fixed | 是否固定在顶部 | `Boolean` | `false` |
|
||||
| border | 是否显示下边框 | `Boolean` | `true` |
|
||||
| z-index | 元素 z-index | `Number` | `1` |
|
||||
|
||||
### Slot
|
||||
|
@ -5,10 +5,14 @@ VantComponent({
|
||||
|
||||
props: {
|
||||
title: String,
|
||||
fixed: Boolean,
|
||||
leftText: String,
|
||||
rightText: String,
|
||||
leftArrow: Boolean,
|
||||
fixed: Boolean,
|
||||
border: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
zIndex: {
|
||||
type: Number,
|
||||
value: 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
<view
|
||||
class="custom-class van-nav-bar van-hairline--bottom {{ fixed ? 'van-nav-bar--fixed' : '' }}"
|
||||
class="custom-class van-nav-bar {{ border ? 'van-hairline--bottom' : '' }} {{ fixed ? 'van-nav-bar--fixed' : '' }}"
|
||||
style="z-index: {{ zIndex }}"
|
||||
>
|
||||
<view class="van-nav-bar__left" bind:tap="onClickLeft">
|
||||
|
Loading…
x
Reference in New Issue
Block a user