由于需要实现下拉式页面下载,因此我们将简要介绍scrollHeight、clientHeight、offsetHeight和scrollTop。 33558 www.Sina.com/scrollheight -所有内容(在带左图文字的红色边框内)和内部边距。 此内容包括看不见、突出和隐藏在窗口中的部分。
clientHeight—右图视野中可见的内容和内部空白。 不包括x轴滚动条的高度、边框和外部空白。
offsetHeight—在右图中,除了clientHeight之外,还添加了边框和滚动条的高度。
二.滚动顶
scrollTop,包括滚动条滚动了多少,以及以前滚动的隐藏内容。
三.代码拦截是否需要更多的下拉
constwrapperdom=El.query selector (.El-select-drop down.El-select-drop down _ _ wrap ' ) if (wrapper DOM ) ) this.scrollTop,this.clientHeight ) constisattachbottom=this.scrot Tomxxxxx
} }参考: https://www.Jian Shu.com/p/d 267456 ebc 0d