Skip to content

Commit b2d6c18

Browse files
committed
Both totop and tobottom no param
1 parent 2418710 commit b2d6c18

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/index.js

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

206206
// emit event in special position
207207
emitEvent (offset, clientSize, scrollSize, evt) {
208-
const range = this.virtual.getRange()
209208
if (this.virtual.isFront() && !!this.dataSources.length && (offset - this.topThreshold <= 0)) {
210-
this.$emit('totop', evt, range)
209+
this.$emit('totop')
211210
} else if (this.virtual.isBehind() && (offset + clientSize + this.bottomThreshold >= scrollSize)) {
212-
this.$emit('tobottom', evt, range)
211+
this.$emit('tobottom')
213212
} else {
214-
this.$emit('scroll', evt, range)
213+
this.$emit('scroll', evt, this.virtual.getRange())
215214
}
216215
},
217216

0 commit comments

Comments
 (0)