Skip to content

Commit

Permalink
fix(pull-refresh): fix the bug of touchmove
Browse files Browse the repository at this point in the history
  • Loading branch information
BeADre committed May 10, 2021
1 parent 576caf1 commit 88aa3af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/pull-refresh/PullRefresh.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default defineComponent({
const touchMove = (event: TouchEvent) => {
const scrollTop = getScrollTop(scroller)
if (scrollTop > 0 || !isTouchable.value) return
if (scrollTop === 0 && distance.value !== CONTROL_POSITION) event.cancelable && event.preventDefault()
if (scrollTop === 0 && distance.value > CONTROL_POSITION) event.cancelable && event.preventDefault()
const moveDistance = (event.touches[0].clientY - startPosition.value) / 2 + CONTROL_POSITION
Expand Down

0 comments on commit 88aa3af

Please sign in to comment.