Skip to content

Commit

Permalink
fix: pull refresh when document not scroll top
Browse files Browse the repository at this point in the history
  • Loading branch information
chuanshuoye committed Mar 20, 2019
1 parent 49259c4 commit 25371bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pull/src/pull.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,11 @@ export default {
this.doRefreshAction(action, offset);
return true;
},
onDragEnd() {
onDragEnd(event, { offsetY }) {
const { onRefresh } = this;
if (offsetY < 0) return;
// 未滚动到顶部
if (offsetY > 0 && (document.documentElement.scrollTop + document.body.scrollTop) > 0) return;
if (this.refreshState === REFRESH_STATE.pull) {
this.doRefreshAction(REFRESH_STATE.normal);
Expand Down

0 comments on commit 25371bc

Please sign in to comment.