File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
uview-ui/components/u-navbar Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 28
28
</view >
29
29
</view >
30
30
<!-- 解决fixed定位后导航栏塌陷的问题 -->
31
- <view class =" u-navbar-placeholder" v-if =" isFixed" :style =" { width: '100%', height: Number(navbarHeight) + statusBarHeight + 'px' }" ></view >
31
+ <view class =" u-navbar-placeholder" v-if =" isFixed && !immersive " :style =" { width: '100%', height: Number(navbarHeight) + statusBarHeight + 'px' }" ></view >
32
32
</view >
33
33
</template >
34
34
59
59
* @property {Boolean} is -back 是否显示导航栏左边返回图标和辅助文字(默认true)
60
60
* @property {Object} background 导航栏背景设置,见官网说明(默认{ background: '#ffffff' })
61
61
* @property {Boolean} is -fixed 导航栏是否固定在顶部(默认true)
62
+ * @property {Boolean} immersive 沉浸式,允许fixed定位后导航栏塌陷,仅fixed定位下生效(默认false)
62
63
* @property {Boolean} border -bottom 导航栏底部是否显示下边框,如定义了较深的背景颜色,可取消此值(默认true)
63
64
* @example < u- navbar back- text= " 返回" title= " 剑未配妥,出门已是江湖" >< / u- navbar>
64
65
*/
137
138
type: Boolean ,
138
139
default: true
139
140
},
141
+ // 是否沉浸式,允许fixed定位后导航栏塌陷,仅fixed定位下生效
142
+ immersive: {
143
+ type: Boolean ,
144
+ default: false
145
+ },
140
146
// 是否显示导航栏的下边框
141
147
borderBottom: {
142
148
type: Boolean ,
You can’t perform that action at this time.
0 commit comments