收藏
回答

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))

}

)

}

回答关注问题邀请回答
收藏

3 个回答

登录 后发表内容
问题标签