Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/vue-pull-refresh.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@

// bind touchstart event to store start position of touch
el.addEventListener('touchstart', e => {
this.cancelPull = false;
if (el.scrollTop === 0) {
this.canPull = true;
} else {
Expand All @@ -126,6 +127,11 @@
* finally, update the status of pull down based on the distance
*/
el.addEventListener('touchmove', e => {
if (this.cancelPull) {
this.pullDown.height = 0;
return;
}

if (!this.canPull) {
return;
}
Expand Down