代码如下:
const query = wx.createSelectorQuery()
const selectors = '.share-report-li, #userInfoBorder, #userInfoHeadimgBorder, #userInfoHeadimg, #userInfoText, #evaluationContent, #knowledgeContentBorder, #knowledgeContent, #shareGroup, #shareLoc, #shareSmallprogramCode, #shareWeixin, #shareGrowUp'
query.selectAll(selectors).boundingClientRect()
query.selectViewport().scrollOffset()
query.exec(res => {
console.log('getLiNodes', res)
})
现象:
(1)获取节点信息有时会出现top负值,有时正常
本文网址:http://www.91bianli.com/weixinxiaochengxu/11015.html