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