var _this = this;
this.createSelectorQuery().select('#imagecompresscanvas').fields({
node: true,
size: true,
}).exec(function(res){
_this.data.imgCavObj = res[0].node;
_this.data.imgCtx = res[0].node.getContext('2d');
_this.data.cavImg = res[0].node.createImage();
_this.data.dpr = wx.getSystemInfoSync().pixelRatio;
});
这段代码在开发工具上执行正常,用HarmonyOS 2.0.0手机调试,不执行,是哪里的问题?
真机预览呢