评论

canvasGetImageData:fail fail canvas is empty

canvasGetImageData:fail fail canvas is empty

<canvas id=“imageCanvas” type=“2d” />

新版本canvas接口一半不传入canvas-id
但是 wx.canvasGetImageData 需要canvasId

test(){
var that = this;
wx.canvasGetImageData({
// canvas: that.data.canvas,
canvasId: that.data.canvas,
x: x,
y: y,
width: that.data.imageWidth,
height: that.data.imageHeight,
success: function (res) {
},
fail: function (err) {
console.error(‘Failed to get image data:’, err);
}
},that);
}
可调通,微信文档一塌糊涂

最后一次编辑于  08-08  
点赞 0
收藏
评论
登录 后发表内容