liudong
2024-08-20 00a3929fe7003715bb4d48f72a3ac2a0550f5588
历史记录请求加载
1个文件已修改
45 ■■■■■ 已修改文件
src/views/sessionManager/components/historySession.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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");