Skip to content

Commit 8e801c5

Browse files
committed
Fixed scroll event emit misss
1 parent c556a97 commit 8e801c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,12 @@ const VirtualList = Vue.component('virtual-list', {
205205

206206
// emit event in special position
207207
emitEvent (offset, clientSize, scrollSize, evt) {
208+
this.$emit('scroll', evt, this.virtual.getRange())
209+
208210
if (this.virtual.isFront() && !!this.dataSources.length && (offset - this.topThreshold <= 0)) {
209211
this.$emit('totop')
210212
} else if (this.virtual.isBehind() && (offset + clientSize + this.bottomThreshold >= scrollSize)) {
211213
this.$emit('tobottom')
212-
} else {
213-
this.$emit('scroll', evt, this.virtual.getRange())
214214
}
215215
},
216216

0 commit comments

Comments
 (0)