canvas.toDataURL is not a function?
想实现canvas do,undo的效果,发现canvas.toDataURL is not a function? do(e){ var that=this wx.createSelectorQuery().select('#canvas'+that.data.list.genre).fields({ node: true, size: true }).exec( (res)=>{ const canvas = res[0].node that.data.canvas.history=[] that.data.canvas.history.push(canvas.toDataURL('image/png',1)) } ) }[图片]