为什么canvas用的新的属性还是不显示图片?
<canvas type="2d" id="myCanvas"></canvas>
wx.getImageInfo({
src: 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTI3GKlCI8afMPe8AoDfokUhiaw1eFWay8z2BH59zks43coenOt6Vd3rK20iaslXcZmGxjdybFt4OYUA/0',
success: function(res) {
const query = wx.createSelectorQuery()
query.select('#myCanvas')
.fields({ node: true, size: true })
.exec((res) => {
const canvas = res[0].node
const ctx = canvas.getContext('2d')
ctx.drawImage(res.path, 0, 0, 100, 100)
ctx.draw()
})
}
})