Skip to content

类型: UseScrollToOptions<> ​

属性 ​

observe ​

• observe: undefined | string

用于监听特定元素的选择器。如果提供该属性,将使用 IntersectionObserver.relativeToViewport 进行监听。详细信息请参阅:https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.relativeToViewport.html


observeOffset ​

• observeOffset: any

需要与 observe 搭配使用,指定 top 和 bottom 值,详细信息请参阅:https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.relativeToViewport.html


visibleThreshold ​

• visibleThreshold: undefined | number

滚动阈值,可以接收负数。当阈值为正数时,表示当页面滚动位置大于等于阈值时元素显示,当阈值为负数时,表示当页面滚动位置小于等于阈值时元素显示。