ElemeFE/vue-infinite-scroll

Firing without reaching bottom

willPHPwork opened this issue · 4 comments

Firing with each scroll regardless of page height.

<template>
	<div class="business-list-wrapper">
		<div class="dd" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="5">
			<div 
			v-for="(d, i) in data" 
			:key="i"
			style="height:300px"
			>
			{{ d.name }}
			</div>
		</div>
	</div>
</template>
<script>
let count = 0;

export default {
  data() {
  	return {
  		data: [],
    	busy: false
  	}
  },
  methods: {
    loadMore: function() {
      this.busy = true;

      setTimeout(() => {
        for (var i = 0, j = 10; i < j; i++) {
          this.data.push({ name: count++ });
        }
        this.busy = false;
      }, 1000);
    }
  }
}
</script>

I'm facing the same issue, loadMore is getting infinitely called.

Same here

@Leopoldthecoder Please assign this issue to me. I'm trying to resolve this.

I'm facing the same issue here also, loadMore method is getting infinity called.