feat: 更新多个页面的样式,使用windowHeight替代screenHeight以适应不同设备
This commit is contained in:
parent
4f6a97db9e
commit
08b0121560
@ -4,7 +4,7 @@
|
||||
v-if="deviceInfo"
|
||||
class="scroll-view"
|
||||
scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.statusBarHeight + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.statusBarHeight + 'px' }"
|
||||
>
|
||||
<view style="padding-bottom: calc(env(safe-area-inset-bottom) + 300rpx)">
|
||||
<view
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
lower-threshold="100"
|
||||
@refresherrefresh="refresherList"
|
||||
:refresher-enabled="true"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
lower-threshold="100"
|
||||
@refresherrefresh="refresherList"
|
||||
:refresher-enabled="true"
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</up-tabs>
|
||||
</view>
|
||||
<swiper
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
v-if="deviceInfo"
|
||||
:list="tabs"
|
||||
:autoplay="false"
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</up-tabs>
|
||||
</view>
|
||||
<swiper
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
v-if="deviceInfo"
|
||||
:list="tabs"
|
||||
:autoplay="false"
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</up-tabs>
|
||||
</view>
|
||||
<swiper
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
v-if="deviceInfo"
|
||||
:list="tabs"
|
||||
:autoplay="false"
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</up-tabs>
|
||||
</view>
|
||||
<swiper
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
v-if="deviceInfo"
|
||||
:list="tabs"
|
||||
:autoplay="false"
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</up-tabs>
|
||||
</view>
|
||||
<swiper
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
v-if="deviceInfo"
|
||||
:list="tabs"
|
||||
:autoplay="false"
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</up-tabs>
|
||||
</view>
|
||||
<swiper
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
v-if="deviceInfo"
|
||||
:list="tabs"
|
||||
:autoplay="false"
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</up-tabs>
|
||||
</view>
|
||||
<swiper
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
v-if="deviceInfo"
|
||||
:list="tabs"
|
||||
:autoplay="false"
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</up-tabs>
|
||||
</view>
|
||||
<swiper
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top - 44 + 'px' }"
|
||||
v-if="deviceInfo"
|
||||
:list="tabs"
|
||||
:autoplay="false"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
lower-threshold="100"
|
||||
@refresherrefresh="refresherList"
|
||||
:refresher-enabled="true"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
lower-threshold="100"
|
||||
@refresherrefresh="refresherList"
|
||||
:refresher-enabled="true"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
lower-threshold="100"
|
||||
@refresherrefresh="refresherList"
|
||||
:refresher-enabled="true"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
lower-threshold="100"
|
||||
@refresherrefresh="refresherList"
|
||||
:refresher-enabled="true"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
lower-threshold="100"
|
||||
@refresherrefresh="refresherList"
|
||||
:refresher-enabled="true"
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: `calc(${deviceInfo.screenHeight - deviceInfo.safeArea.top - 60}px)` }"
|
||||
:style="{ height: `calc(${deviceInfo.windowHeight - deviceInfo.safeArea.top - 60}px)` }"
|
||||
lower-threshold="100"
|
||||
@refresherrefresh="refresherList"
|
||||
:refresher-enabled="true"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
lower-threshold="100"
|
||||
@refresherrefresh="refresherList"
|
||||
:refresher-enabled="true"
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: `${deviceInfo.screenHeight - deviceInfo.safeArea.top}px` }"
|
||||
:style="{ height: `${deviceInfo.windowHeight - deviceInfo.safeArea.top}px` }"
|
||||
lower-threshold="100"
|
||||
@refresherrefresh="refresherList"
|
||||
:refresher-enabled="true"
|
||||
@ -213,36 +213,36 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.search {
|
||||
padding: 32rpx;
|
||||
width: 686rpx !important;
|
||||
padding: 32rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #ffffff;
|
||||
height: 120rpx;
|
||||
width: 750rpx;
|
||||
height: 120rpx;
|
||||
background-color: #ffffff;
|
||||
|
||||
.item-left {
|
||||
margin-left: 32rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
margin-left: 32rpx;
|
||||
}
|
||||
|
||||
.item-right {
|
||||
width: 574rpx;
|
||||
margin-right: 32rpx;
|
||||
margin-left: 32rpx;
|
||||
width: 574rpx;
|
||||
|
||||
.item-right-top {
|
||||
max-width: 400rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
padding-bottom: 6rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.item-right-bottom {
|
||||
@ -266,9 +266,9 @@
|
||||
}
|
||||
|
||||
.empty-list-text {
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.status {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
@refresherrefresh="refresher"
|
||||
:refresher-enabled="true"
|
||||
:refresher-triggered="refresherTriggered"
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:lower-threshold="100"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top - 145 + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top - 145 + 'px' }"
|
||||
:refresher-enabled="true"
|
||||
@refresherrefresh="onRefresh"
|
||||
@scrolltolower="onScrollToLower"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
lower-threshold="100"
|
||||
@refresherrefresh="refresherList"
|
||||
:refresher-enabled="true"
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
scroll-y="true"
|
||||
:style="{
|
||||
height:
|
||||
deviceInfo.screenHeight -
|
||||
deviceInfo.windowHeight -
|
||||
deviceInfo.safeArea.top -
|
||||
(deviceInfo.screenWidth / 750) * 128 +
|
||||
'px'
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
lower-threshold="100"
|
||||
>
|
||||
<view class="search">
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
scroll-y="true"
|
||||
:style="{
|
||||
height:
|
||||
deviceInfo.screenHeight -
|
||||
deviceInfo.windowHeight -
|
||||
deviceInfo.safeArea.top -
|
||||
(deviceInfo.screenWidth / 750) * 128 +
|
||||
'px'
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
:scroll-y="true"
|
||||
:style="{ height: deviceInfo.screenHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
:style="{ height: deviceInfo.windowHeight - deviceInfo.safeArea.top + 'px' }"
|
||||
>
|
||||
<view class="pb-[calc(env(safe-area-inset-bottom)+250rpx)]">
|
||||
<view
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user