canvasGetImageData({
canvasId: 'canvas',
x: 0,
y: 0,
width: scaledWidth,
height: scaledHeight,
success(res) {
console.log('res', res);
handleImageData(res.data);
},
fail: err => {
console.log('err', err);
},
});
ts有警告x、y、width、height为不能将类型“number”分配给类型“string”,代码运行后报错err Cannot read property 'x' of undefined