Skip to content

Commit 54232bf

Browse files
committed
[fix] scroll: should clear resetPullDownTimer on pullingDown
1 parent 2c25320 commit 54232bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/scroll/scroll.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,9 @@
282282
this.scroll.off('scroll', this._pullDownScrollHandle)
283283
},
284284
_pullDownHandle() {
285+
if (this.resetPullDownTimer) {
286+
clearTimeout(this.resetPullDownTimer)
287+
}
285288
this.beforePullDown = false
286289
this.isPullingDown = true
287290
this.$emit(EVENT_PULLING_DOWN)
@@ -310,13 +313,12 @@
310313
return new Promise((resolve) => {
311314
setTimeout(() => {
312315
this.scroll.finishPullDown()
313-
this.isPullingDown = false
314316
resolve()
315317
}, stopTime)
316318
})
317319
},
318320
_afterPullDown(dirty) {
319-
setTimeout(() => {
321+
this.resetPullDownTimer = setTimeout(() => {
320322
this.pullDownStyle = `top:${PULL_DOWN_ELEMENT_INITIAL_HEIGHT}px`
321323
this.beforePullDown = true
322324
dirty && this.refresh()

0 commit comments

Comments
 (0)