Version: 1.3.42
selectorQuery.selectViewport()
选择显示区域,可用于获取显示区域的尺寸、滚动位置等信息,返回一个 NodesRef 对象实例。
API支持度
API | 微信小程序 | H5 | React Native |
---|---|---|---|
selectorQuery.in | ✔️ | ✔️ | |
selectorQuery.select | ✔️ | ✔️ | |
selectorQuery.selectAll | ✔️ | ✔️ | |
selectorQuery.selectViewport | ✔️ | ✔️ | |
nodesRef.boundingClientRect | ✔️ | ✔️ | |
nodesRef.scrollOffset | ✔️ | ✔️ | |
nodesRef.fields | ✔️ | ✔️ | |
selectorQuery.exec | ✔️ | ✔️ |