<canvas id="myCanvas" canvas-id="myCanvas"/>
<view @tap="getTempFilePath">保存图片</view>
getTempFilePath() {
console.log(0)
wx.canvasToTempFilePath({
canvasId: 'myCanvas',
success: res => {
console.log('res', res)
},
fail: err => {
console.log('err', err)
},
complete: () => {
console.log('complete')
}
})
}
只能输出0. wx.canvasToTempFilePath这个api根本没有被调用???
ps:
基础库: 1.6.0
微信开发者工具: 1.01.171019
你好,请问在客户端上有效果吗