ustbhuangyi / better-scroll

:scroll: inspired by iscroll, and it supports more features and has a better scroll perfermance

Home Page:https://better-scroll.github.io/docs/en-US/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[New Feature] 希望初始化的时候,可以手动选择锁定的滚动方向

skySlient opened this issue · comments

What problem does this feature solve?

我使用插件遇到了一个问题,初始化的时候,因为插件需要通过directionLockThreshold自动计算锁定的滚动方向,导致初始化的时候,横向滚动的元素,必须要先滚动完成一次,才能锁定滚动条,如果我手动将滚动条的高度归0,则会使元素出现弹跳的现象,所以希望可以增加该新功能

What does the proposed API look like?

配置项新增directionLocked选项,并可以在初始化的时候就根据用户传入的属性,锁定滚动条

还是没太明白需求 可以试着PR下

https://xev-wechat.adbaoheng.com/Product可以参考我使用了该插件所写的页面,横向滚动的元素在第一次滚动的时候会上下弹跳