Skip to content

Commit

Permalink
chore: Get rid of redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
bigyifeng committed Dec 5, 2023
1 parent 2eae1f3 commit d3c7202
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ export default {
handleScroll (event) {
if (!this.$_scrollDirty) {
this.$_scrollDirty = true
this.$emit('scroll-start', this.getScroll());
const scroll = this.getScroll()
this.$emit('scroll-start',scroll);
if (this.$_updateTimeout) return
const requestUpdate = () => requestAnimationFrame(() => {
Expand All @@ -390,7 +391,7 @@ export default {
if (!continuous) {
clearTimeout(this.$_refreshTimeout)
this.$_refreshTimeout = setTimeout(this.handleScroll, this.updateInterval + 100)
this.$emit('scroll-end', this.getScroll());
this.$emit('scroll-end', scroll);
}
})
Expand Down

0 comments on commit d3c7202

Please # to comment.