Skip to content

Commit

Permalink
Merge pull request didi#459 from didi/dev
Browse files Browse the repository at this point in the history
fix(scroll): nested scroll bug
  • Loading branch information
tank0317 authored Apr 11, 2019
2 parents 2a6ae4a + a177a98 commit 3541b8b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/scroll/scroll.vue
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,18 @@
const reachBoundaryX = distX > 0 ? pos.x >= this.scroll.minScrollX : distX < 0 ? pos.x <= this.scroll.maxScrollX : false
const reachBoundaryY = distY > 0 ? pos.y >= this.scroll.minScrollY : distY < 0 ? pos.y <= this.scroll.maxScrollY : false
const freeScroll = this.scroll.freeScroll
const hasHorizontalScroll = this.scroll.hasHorizontalScroll
const hasVerticalScroll = this.scroll.hasVerticalScroll
if (!hasHorizontalScroll && !hasVerticalScroll) {
return true
}
let reachBoundary
if (freeScroll) {
return reachBoundaryX || reachBoundaryY
}
let reachBoundary
if (this.scroll.movingDirectionX) {
reachBoundary = reachBoundaryX
} else if (this.scroll.movingDirectionY) {
Expand Down

0 comments on commit 3541b8b

Please sign in to comment.