From 00a3929fe7003715bb4d48f72a3ac2a0550f5588 Mon Sep 17 00:00:00 2001 From: liudong <liudong> Date: 星期二, 20 八月 2024 09:56:24 +0800 Subject: [PATCH] 历史记录请求加载 --- src/views/sessionManager/components/historySession.vue | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 44 insertions(+), 1 deletions(-) diff --git a/src/views/sessionManager/components/historySession.vue b/src/views/sessionManager/components/historySession.vue index 30ee2ad..24ef4e3 100644 --- a/src/views/sessionManager/components/historySession.vue +++ b/src/views/sessionManager/components/historySession.vue @@ -18,9 +18,10 @@ </a-button> <a-scrollbar + ref="scrollRef" class="left-list" style=" - height: calc(100vh - 100px); + height: calc(100vh - 160px); overflow-y: auto; overflow-x: hidden; " @@ -112,6 +113,7 @@ const searchValue = ref(""); const selectValue = ref(""); const sectionList = ref({}); +const scrollRef = ref(null); const httpUrl = localStorage.getItem('httpUrl'); const imgSrc = ref(logo); const DialogList = async () => { @@ -243,6 +245,30 @@ session.showtype = 1; }; + +const handleScroll = async (e: any) => { + // scrollTopVal.value = e.target.scrollTop + // let offsetHeight = e.target.offsetHeight + // let scrollHeight = e.target.scrollHeight + // + // if (scrollTopVal.value + offsetHeight >= scrollHeight) { + // //婊氬姩鏉″埌杈惧簳閮� + // if (cardData.value.length < total.value) { + // //鏁版嵁涓哄姞杞藉畬锛岀户缁祴鍊� + // serarchData.pageNum++ + // + // + // + // } + // } +} + +const loading: any = computed(() => { + // cardData.value.length >= total.value +}) + + + onBeforeMount(()=>{ // DialogList() querySessionList(''); @@ -255,6 +281,23 @@ querySessionList(''); }); + +// 缁欏厓绱犳坊鍔犳粴鍔ㄤ簨浠剁洃鍚� +// if (scrollRef.value) { +// // 缁欏厓绱犳坊鍔犳粴鍔ㄧ洃鍚櫒 +// +// scrollRef.value.addEventListener('scroll', handleScroll, true) +// +// // 濡傛灉浣犻渶瑕佸湪缁勪欢鍗歌浇鏃剁Щ闄ょ洃鍚櫒锛屽彲浠ヨ繑鍥炰竴涓竻鐞嗗嚱鏁� +// return () => { +// scrollRef.value.removeEventListener('scroll', handleScroll, true) +// } +// } + + + + + }) onBeforeUnmount(() => { EventBus.off("history"); -- Gitblit v1.8.0