0.1.1 • Published 6 years ago

@sfc-components/scroll-view v0.1.1

Weekly downloads
1
License
BSD-3-Clause
Repository
github
Last release
6 years ago

a-scroll-view

属性名类型默认值描述
classString外部样式名
styleString内联样式名
scroll-xBooleanfalse允许横向滚动
scroll-yBooleanfalse允许纵向滚动
upper-thresholdNumber50距顶部/左边多远时(单位px),触发 scrolltoupper 事件
lower-thresholdNumber50距底部/右边多远时(单位px),触发 scrolltolower 事件
scroll-topNumber设置竖向滚动条位置
scroll-leftNumber设置横向滚动条位置
scroll-into-viewString值应为某子元素id,则滚动到该元素,元素顶部对齐滚动区域顶部
scroll-with-animationBooleanfalse在设置滚动条位置时使用动画过渡
onScrollToUpperEventHandle滚动到顶部/左边,会触发 scrolltoupper 事件
onScrollToLowerEventHandle滚动到底部/右边,会触发 scrolltolower 事件
onScrollEventHandle滚动时触发,event.detail = {scrollLeft, scrollTop, scrollHeight, scrollWidth