wx.createSelectorQuery()真机调试报错,模拟器没事,如何解决?
<view style="height: 100%; width: 100%;" >
<canvas type="webgl" id="c1" class="cc1" style="width: 100%; height:100%;"></canvas>
</view
js文件
Page({
data: {},
onLoad: function () {
console.log('xxx');
try {
wx.createSelectorQuery()
.select('.cc1')
.node()
.exec((res)=>{
console.log(res);
});
} catch (error) {
console.log(error);
}
}
})
以上代码在使用开发工具调试是没问题问题,但真机调试就报错: