screenHeight

This commit is contained in:
shijingjing
2023-02-07 17:48:01 +08:00
parent 05d16d524b
commit 9cff340894

View File

@@ -1,15 +1,16 @@
<template>
<div class="AppSignIn">
<div class="title">打卡记录</div>
<div class="sign_list" style="overflow-y: scroll;">
<div class="sign_card" v-for="item in signlist" :key="item.id">
<div class="sign_left">{{ item.createTime.substring(0,5) }}</div>
<div class="sign_right">
<div class="time">{{ item.createDate }}</div>
<div class="tips">打卡成功</div>
<div class="sign_list" :style="{height: screenHeight + 'px'}">
<scroll-view scroll-y style="height: 100%;">
<div class="sign_card" v-for="item in signlist" :key="item.id">
<div class="sign_left">{{ item.createTime.substring(0,5) }}</div>
<div class="sign_right">
<div class="time">{{ item.createDate }}</div>
<div class="tips">打卡成功</div>
</div>
</div>
</div>
</scroll-view>
</div>
<div class="sign_btn">
@@ -32,6 +33,7 @@ export default {
status: 0, // 打卡状态0、未打卡1、已打卡
signlist: [],
current: 1,
screenHeight: '',
}
},
computed: {
@@ -74,7 +76,12 @@ export default {
setInterval(() => {
this.time = dayjs(new Date()).format('HH:mm:ss')
}, 1000)
}
uni.getSystemInfo({
success: (res)=>{
this.screenHeight = res.screenHeight - 250;
}
})
},
}
</script>
@@ -82,6 +89,7 @@ export default {
.AppSignIn {
padding: 0px 32px;
box-sizing: border-box;
height: 100%;
.title {
font-weight: 600;
@@ -93,11 +101,12 @@ export default {
padding-left: 32px;
box-sizing: border-box;
background: #F5F5F5;
overflow-y: none;
}
.sign_list {
width: 100%;
height: calc(100% - 500px);
// height: calc(100% - 500px);
.sign_card {
display: flex;
background: #FFFFFF;