canvas type=2d putimagedata报错 canvas is empty?
我之前用的老版本canvas putimagedata能够将数据绘制出来,但是现在我用了type=2d之后,一直报错 "canvasPutImageData: fail canvas is empty" 我这个canvasPutImageData是在其他文件里调用的 wx.canvasPutImageData({ canvasId: this.ctx.canvasId, data: this.data, height: this.width, width: this.height, x: 0, y: 0, },page).then((res)=>{ console.log("success",res)}) .catch(reson=>{ console.log("fail") console.log(reson) }) 这个page参数是我把页面的this传过来的.一直就是报错,找不到canvas. 这是canvasputimagedata需要传递canvasId, [图片] 但是type=2d时 [图片] 如果定义了type则无需指定canvas-id,是不是说明定义了type=2d,则该属性无效?