This commit is contained in:
姚宇浩 2024-05-28 14:41:01 +08:00
parent aeb8722224
commit 97bf08d6d1
1 changed files with 11 additions and 8 deletions

View File

@ -129,12 +129,13 @@
</div> </div>
<div class="flex1"> <div class="flex1">
<div class="yd_title last"></div> <div class="yd_title last"></div>
<div <div
class="t" class="table"
ref="mainRef"
@mouseenter="stopAutoScroll" @mouseenter="stopAutoScroll"
@mouseleave="startAutoScroll" @mouseleave="startAutoScroll"
> >
<div class="table" ref="mainRef">
<div class="item" v-for="item in data.jkhd"> <div class="item" v-for="item in data.jkhd">
{{ item.jkhd }} {{ item.jkhd }}
</div> </div>
@ -142,7 +143,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script setup> <script setup>
@ -202,7 +202,6 @@ const autoScroll = () => {
setTimeout(autoScroll, 2000); // 2 setTimeout(autoScroll, 2000); // 2
}, 1000); // 1 }, 1000); // 1
} else { } else {
requestAnimationFrame(autoScroll); requestAnimationFrame(autoScroll);
} }
}; };
@ -212,7 +211,11 @@ onBeforeMount(async () => {
}); });
onMounted(() => { onMounted(() => {
startAutoScroll(); startAutoScroll();
console.log(mainRef.value.scrollTop,mainRef.value.scrollHeight,mainRef.value.clientHeight); console.log(
mainRef.value.scrollTop,
mainRef.value.scrollHeight,
mainRef.value.clientHeight
);
}); });
const getData = async () => { const getData = async () => {
await http.get("/api/ggfwyth/health").then((res) => { await http.get("/api/ggfwyth/health").then((res) => {