收藏
回答

canvas2d画图.exec(res=>....res为空?

<canvas type="2d" id="poster" canvas-id="poster" style='width:{{canvasWidth}}px; height:{{canvasHeight}}px'  class="poster_canvas" ></canvas>

const query = wx.createSelectorQuery()
          query.select('#poster').fields({node:true,size:true}).exec( res=>{
            console.log(res)
            const canvas = res[0].node
            const ctx = canvas.getContext('2d')
回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容