Skip to content

Commit 25371bc

Browse files
committed
fix: pull refresh when document not scroll top
1 parent 49259c4 commit 25371bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pull/src/pull.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,11 @@ export default {
126126
this.doRefreshAction(action, offset);
127127
return true;
128128
},
129-
onDragEnd() {
129+
onDragEnd(event, { offsetY }) {
130130
const { onRefresh } = this;
131+
if (offsetY < 0) return;
132+
// 未滚动到顶部
133+
if (offsetY > 0 && (document.documentElement.scrollTop + document.body.scrollTop) > 0) return;
131134
132135
if (this.refreshState === REFRESH_STATE.pull) {
133136
this.doRefreshAction(REFRESH_STATE.normal);

0 commit comments

Comments
 (0)