获取canvas的宽高为null
<canvas style=“width: 300px; height: 200px;” canvas-id=“firstCanvas”></canvas>
console.log(wx.createSelectorQuery().select(’#firstCanvas’).boundingClientRect().exec(res => { console.log(res, ‘canvas’) }))
获取到的是null
3 回复