The rolling load

NPM I vue-infinite-scroll --save import: import infiniteScroll from'vue-infinite-scroll'Configuration:exportDefault {directives: {infiniteScroll}} Use: <div class="scroll-more" 
       v-infinite-scroll="scrollMore"// The callback function infinite-scroll-disabled="true"// The infinite scroll distance= callback is determined by the busy variable"410"// Trigger the callback v-if= when the page scrolls to a number of pixels from the end of the page"false">
       <img src="/imgs/loading-svg/loading-spinning-bubbles.svg" alt="" v-show="loading"> </div> // example callback functionscrollMore(){
       this.busy = true;
       setTimeout(() => { this.pageNum++; this.getList(); }, 500); }, // specifically for scrollMoregetList(){
       this.loading = true;
       this.axios.get('/orders',{
              params:{
                     pageSize:10,
                     pageNum:this.pageNum
              }
       }).then((res)=>{
              this.list = this.list.concat(res.list);
              this.loading = false;
              if(res.hasNextPage){
                     this.busy=false;
              }else{
                     this.busy=true; }}); }Copy the code