vue滚动触底加载更多

废话不多说,代码:


```javascript
scrollBottom() {    
                // console.log("可视高度: ", window.screen.height)
                // console.log("全文高度: ", document.body.clientHeight)
                // console.log("滚动距离: ", document.documentElement.scrollTop)
                // console.log("this.REQUIRE: ", this.REQUIRE)
                // 滚动到页面底部时,内容
                if ( ((document.documentElement.scrollTop + window.screen.height) > (document.body.clientHeight)) && this.REQUIRE ) {
                // 下面是具体业务逻辑内容
                    console.log("触底 offset: ", this.offset)
                    let theOffset = this.offset;
                    this.offset = theOffset + 1;
                    this.coinDetailQuery()
                }
            },

你可能感兴趣的:(Vue,JavaScript)