S2
S2 copied to clipboard
🙏 分别配置 x 轴和 y 轴滚动的 overscrollBehavior
🖋 Description
目前 overscrollBehavior 设置后 x 轴和 y 轴的滚动表现相同,在某些特殊场景下需要 x 轴和 y 轴的 overscrollBehavior 能够单独配置。
🏞 What problem does this feature solve
🧐 Suggest the API
遵循 MDN 的设计,overscrollBehavior 支持传入单个值,或者长度为 2 的 array
type OverscrollBehavior = 'auto' | 'none' | 'contain';
overscrollBehavior?: OverscrollBehavior | [OverscrollBehavior, OverscrollBehavior];
| name | type | default | description |
|---|---|---|---|
| - | - | - | - |
type overscrollBehavior = OverscrollBehavior | {
horizontal?: OverscrollBehavior
vertical?: OverscrollBehavior
}
或者
type overscrollBehavior = OverscrollBehavior | {
x?: OverscrollBehavior
y?: OverscrollBehavior
}