2019-3-3 22:51:13

This commit is contained in:
Weilanwl
2019-03-03 22:51:19 +08:00
parent 6637f6fbef
commit 85246262a1
13 changed files with 172 additions and 37 deletions
+19
View File
@@ -0,0 +1,19 @@
const app = getApp()
Page({
data: {
},
onLoad: function () {
wx.getSystemInfo({
success: e => {
let custom = wx.getMenuButtonBoundingClientRect();
this.setData({
StatusBar: e.statusBarHeight,
Custom: custom,
CustomBar: custom.bottom + custom.top - e.statusBarHeight
})
}
})
},
})
+3
View File
@@ -0,0 +1,3 @@
{
"usingComponents": {}
}
+6
View File
@@ -0,0 +1,6 @@
<view class="custom" style="height:{{CustomBar}}px;">
<view class="bar" style="height:{{CustomBar}}px;padding-top:{{StatusBar}}px;">
<navigator class='border-custom' open-type="navigateBack" delta="1" hover-class="none" style='width:{{Custom.width}}px;height:{{Custom.height}}px;margin-left:calc(750rpx - {{Custom.right}}px)'></navigator>
</view>
</view>
<view class='StatusBar' style="height:{{StatusBar}}px;" ></view>
+22
View File
@@ -0,0 +1,22 @@
.custom {
background-color: #333;
}
.bar{
display: flex;
align-items: center;
background: #555;
position: fixed;
top: 0;
width: 50%;
}
.StatusBar {
position: fixed;
background-color: #da0000;
width: 75%;
top: 0;
left: 0;
}
.border-custom{
background-color: #fff;
border-radius: 50px;
}
+3 -3
View File
@@ -9,7 +9,7 @@
<navigator url='filter' class='bg-grey padding radius'>
<text>filterblur引起的ios花屏测试</text>
</navigator>
<!-- <navigator url='filter' class='bg-grey padding radius margin-top'>
<text>filterblur引起的ios花屏测试</text>
</navigator> -->
<navigator url='custom' class='bg-grey padding radius margin-top'>
<text>胶囊按钮的Api测试</text>
</navigator>
</view>