Get the dom element, monitor the method of dom scroll bar to the bottom

  const dom = document.getElementsByClassName("list-wrapper-tables")[0];
  dom.addEventListener('scroll', function () {
    
    
    //元素滚动条高度 - 元素卷去高度 - 元素可视高度 <= 0 的时候,判断已经到底底部。
    const scrollDistance = dom.scrollHeight - dom.scrollTop - dom.clientHeight
    if (scrollDistance <= 0) {
    
    
      //在此执行函数
      console.log('滚动条滚到到了底部')
    }
  })

Guess you like

Origin blog.csdn.net/m54584mnkj/article/details/130399028