mounted(){ this.loadlist() this.userlist() this.browserRedirect() window.addEventListener("scroll",this.handleFun) }, destroyed(){ window.removeEventListener('scroll', this.handleFun); },
methods:{ handleFun(){ var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; var windowHeight = document.documentElement.clientHeight || document.body.clientHeight; var scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight; if (scrollTop + windowHeight == scrollHeight) { this.page = this.page+1 this.loadlist() } }, }