小程序获取元素的一些属性

let query = wx.createSelectorQuery() query.select('#canvas').boundingClientRect(res => { this.canvasWidth = Math.round(res.width) this.canvasHeight = Math.round(res.height)
相关文章
相关标签/搜索