1.获取方法
onLoad: function (e) { var that = this; wx.createSelectorQuery().select('#the-id').boundingClientRect(function (rect) { that.setData({ container_ Number(rect.width) / 7 }); }).exec() },
2.打印结果
1.获取方法
onLoad: function (e) { var that = this; wx.createSelectorQuery().select('#the-id').boundingClientRect(function (rect) { that.setData({ container_ Number(rect.width) / 7 }); }).exec() },
2.打印结果