const ctx = uni.createCanvasContext(canvas_id);
ctx.drawImage(url, 0, 0, width, height);
return new Promise((resolve, reject) => {
ctx.draw(false, ()=>{
//此方法在这就不执行了(安卓,小程序正常执行)
setTimeout( ()=>{
uni.canvasToTempFilePath({
canvasId: canvas_id,
width: width,
height: height,
destWidth: width,
destHeight: height,
success: (res) => {
resolve(res.tempFilePath)
},
fail: (err) => {
console.log(err)
}
})
},1000)
})
})
1***@qq.com
- 发布:2022-09-01 12:04
- 更新:2022-09-01 12:04
- 阅读:229
canvasToTempFilePath安卓不执行
分类:uni-app
0 个回复