
<view id='viewID'>
<view id="scriptID">
var query = wx.createSelectorQuery()
纤悄 //选择id
query.select('#numID').boundingClientRect()
query.select('#scriptID').boundingClientRect()
query.exec(function (res) {
//res就是 所有标签为mjltest的元素的信息 的数组
console.log('所有:',res)
/毁世渣/取高度
that.setData({
storyHeight:that.data.detailHeight -(res[0].height+res[1].height)
})
})
scroll-view为滚动视图,分为水明渗巧平滚动和垂直滚激键动。注意滚动视图垂直滚动时一定要设置高喊游度否则的话scroll-view不会生效。
滚动视图常用的地方一般都是Item项比较多的界面,
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)