canvasGetImageData调用多次,只有第一次的调用返回结果,求解
- 当前 Bug 的表现(可附上截图)
调用函数如下:
getImageData(x, y, width, height, callback) { console.log('TEST'); // console.log(arguments); wx.canvasGetImageData({ canvasId, x, y, width, height, success(res) { console.log('CALLBACK'); callback(res); } }) }, |
调用两次以上函数:
this.getImageData(0, 0, 10, 10, (res)=>{ test.push(res); console.log('1:',test); }); this.getImageData(10, 10, 10.123456, 10.123456, (res) => { test.push(res.data); console.log('2:',test); }) |
输入结果:
只输出一次callback,第二次调用canvasGetImageData没有返回
-
预期表现
-
复现路径
-
提供一个最简复现 Demo
