Skip to content

Commit

Permalink
fix: 修复scroll无法禁止滚动的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
heiazu committed Jul 25, 2024
1 parent 1f527a2 commit 4b924f5
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ function getAttributes (node: TaroScrollViewElement): ScrollViewAttrs {

function getScrollable (node: TaroScrollViewElement) {
const _attrs = node._attrs

return _attrs.scrollX ? ScrollDirection.Horizontal : ScrollDirection.Vertical
if (_attrs.scrollX) {
return ScrollDirection.Horizontal
} else if (_attrs.scrollY) {
return ScrollDirection.Vertical
} else {
return ScrollDirection.None
}
}

function handleScrollEvent (node: TaroScrollViewElement, eventName = 'scroll', xOffset?: number, yOffset?: number) {
Expand Down

0 comments on commit 4b924f5

Please sign in to comment.