// Get the width and height set equal to the width
var query = wx.createSelectorQuery().in(this);
var that = this;
query.select('.chooseImgItem').boundingClientRect(function (rect) {
console.log(rect);
that.setData({
'objHeight': rect.width + 'px'
})
// console.log(that.data.objHeight);
}).exec();
Getting an element's style
If the acquisition is in the custom components inside, need
var query = wx.createSelectorQuery().in(this);
If it is, then get on the inside page
var query = wx.createSelectorQuery();