提交 07eeb4a4 编写于 作者: H hdx

fix(createCanvasContextAsync): setup 应通过 getCurrentInstance()获取

上级 2983b366
......@@ -63,7 +63,7 @@ canvas相关的API非常多,参考如下:
// 异步调用方式, 跨平台写法
uni.createCanvasContextAsync({
id: 'canvas',
component: this,
component: getCurrentInstance().proxy,
success: (context : CanvasContext) => {
const canvasContext = context.getContext('2d')!;
const canvas = canvasContext.canvas;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册