Skip to content

Commit d3c7202

Browse files
committed
chore: Get rid of redundant code
1 parent 2eae1f3 commit d3c7202

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/vue-virtual-scroller/src/components/RecycleScroller.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,8 @@ export default {
378378
handleScroll (event) {
379379
if (!this.$_scrollDirty) {
380380
this.$_scrollDirty = true
381-
this.$emit('scroll-start', this.getScroll());
381+
const scroll = this.getScroll()
382+
this.$emit('scroll-start',scroll);
382383
if (this.$_updateTimeout) return
383384
384385
const requestUpdate = () => requestAnimationFrame(() => {
@@ -390,7 +391,7 @@ export default {
390391
if (!continuous) {
391392
clearTimeout(this.$_refreshTimeout)
392393
this.$_refreshTimeout = setTimeout(this.handleScroll, this.updateInterval + 100)
393-
this.$emit('scroll-end', this.getScroll());
394+
this.$emit('scroll-end', scroll);
394395
}
395396
})
396397

0 commit comments

Comments
 (0)