https://developers.weixin.qq.com/miniprogram/dev/component/canvas.html
小程序插件中
wx.createSelectorQuery().select('#mycanvas').node(res => {
console.log("node ",res)
const canvas = res.node
const context = canvas.getContext('2d')
}).exec()
wx.createSelectorQuery().select('#mycanvas')能获取到,node()中res为null