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