S2 icon indicating copy to clipboard operation
S2 copied to clipboard

🙏 分别配置 x 轴和 y 轴滚动的 overscrollBehavior

Open LUUUAN opened this issue 2 years ago • 1 comments

🖋 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
- - - -

LUUUAN avatar Sep 13 '23 09:09 LUUUAN

type overscrollBehavior = OverscrollBehavior | {
  horizontal?: OverscrollBehavior
  vertical?: OverscrollBehavior
}

或者

type overscrollBehavior = OverscrollBehavior | {
 x?: OverscrollBehavior
 y?: OverscrollBehavior
}

lijinke666 avatar Sep 13 '23 10:09 lijinke666