今天踩了个坑.就是当底部有浮动时.显示全部内容,利用了好多种方法都没有成功,现在的解决方法就是在添加一个margin-bottom属性,然后获取到底部浮动工具栏的距离,然后把底部的浮动的距离给margin-bottom赋值.就可以显示全部内容了.目前想到的只有这种土方法了.有什么方法可以告知.一下。
var query = wx.createSelectorQuery();
//选择id
query.select('.demo').boundingClientRect((rect)=> {
console.log(rect.height)
this.setData({
height: rect.height
})
}).exec();