<ec-canvas id="mychart" canvas-id="myCanvas" ec="{{ ec }}" force-use-old-canvas="true"></ec-canvas>
canvasId是有的,t第二个参数this,也有,wx.canvasToTempFilePath()调用就报错,报错信息:"canvasToTempFilePath: fail canvas is empty",求指点
setTimeout(() => {
console.log('this=====',this)
wx.canvasToTempFilePath({
canvasId: 'myCanvas',
width:'200',
height:'300',
success: (res) => {
console.log("res",res)
},
fail: (err) => {
console.log("err",err)
},
}, this)
}, 2000)