提交 96e674fb 编写于 作者: H hdx

canvas: app-android 需要延时调用 toDataURL

上级 3a07fa35
......@@ -96,12 +96,15 @@
this.testToBlobResult = (blob.size > 0 && blob.type == 'image/jpeg')
}, 'image/jpeg', 0.95)
// #endif
this.testToDataURLResult = context.toDataURL().startsWith('data:image/png;base64')
this.testCanvasContext = true
}
})
},
onReady() {
// TODO app-android 需要延迟调用
this.testToDataURLResult = this.canvasContext!.toDataURL().startsWith('data:image/png;base64')
// 同步调用方式,仅支持 app/web
// let canvas = uni.getElementById("canvas") as UniCanvasElement
// this.renderingContext = canvas.getContext("2d")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册