Skip to content

Commit 6d5f719

Browse files
committed
hide app-bar
1 parent 79582ea commit 6d5f719

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

miniprogram/app-bar/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,19 @@ Component({
3131
},
3232

3333
data: {
34+
showAppbar: false,
3435
maxCoverSize: 0,
3536
statusBarHeight: 0,
3637
musicCover: 'https://res.wx.qq.com/op_res/Nu9XXzXcXnD1j5EgWQ2ElxNcl1yMvnKypRo4MTbjOv7FC3saigGoOBTZibyESC7EXaClnPYhB6pvfb-IRmso6g'
3738
},
3839

40+
pageLifetimes: {
41+
show: function() {
42+
// 页面被展示
43+
console.log('xxx', this.router)
44+
},
45+
},
46+
3947
lifetimes: {
4048
attached() {
4149
const progress = shared(0)

miniprogram/app-bar/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- components/app-bar/index.wxml -->
22
<vertical-drag-gesture-handler worklet:ongesture="handleVerticalDrag">
3-
<view class="expand-container">
3+
<view class="expand-container" wx:if="{{showAppbar}}">
44
<!-- 放大模式:nav-bar -->
55
<view class="nav-bar column">
66
<view style="height: {{statusBarHeight}}px;" />

miniprogram/app.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,5 @@
474474
}
475475
},
476476
"renderer": "skyline",
477-
"componentFramework": "glass-easel",
478-
"appBar": {}
477+
"componentFramework": "glass-easel"
479478
}

miniprogram/component/navigation-bar/navigation-bar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Component({
6464
this.setData({
6565
ios,
6666
statusBarHeight: res.statusBarHeight,
67+
navBarHeight: rect.bottom - rect.top + 10,
6768
innerWidth: isSupport ? `width:${rect.left}px` : '',
6869
innerPaddingRight: isSupport
6970
? `padding-right:${res.windowWidth - rect.left}px`

miniprogram/component/navigation-bar/navigation-bar.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<view class="weui-navigation-bar {{extClass}}" data-weui-theme="{{theme}}">
2-
<view class="weui-navigation-bar__inner" style="padding-top: {{statusBarHeight}}px; height: {{44 + statusBarHeight}}px; color: {{color}}; background: {{background}}; {{displayStyle}}; {{innerPaddingRight}};">
2+
<view class="weui-navigation-bar__inner" style="padding-top: {{statusBarHeight}}px; height: {{navBarHeight}}px; color: {{color}}; background: {{background}}; {{displayStyle}}; {{innerPaddingRight}};">
33
<view class='weui-navigation-bar__left' style="{{leftWidth}}">
44
<block wx:if="{{back}}">
55
<view class="weui-navigation-bar__buttons">

miniprogram/component/navigation-bar/navigation-bar.wxss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.weui-navigation-bar {
2+
display: flex;
23
overflow: hidden;
34
color: rgba(0, 0, 0, .9);
45
width: 100vw;

0 commit comments

Comments
 (0)