var canvas,ctx;
const query = wx.createSelectorQuery()
query.select('#tutorial')
.fields({ node: true, size: true })
.exec((res) => {
canvas = res[0].node
ctx = Effect.canvas.getContext('2d')
})
const imageData = ctx.getImageData(0,0,canvas.width,canvas.height)
console.log("imageData.data instanceof",imageData.data instanceof Uint8Array,imageData.data instanceof Uint8ClampedArray)
手机端,开发工具都是(右侧)是正常的输出
pc上调试输出是左侧,都是false
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
以下是复现链接
https://developers.weixin.qq.com/s/wMMy78mT7fK9