From 07eeb4a4dd201bb4fb1ebddbca3e80563b988bf5 Mon Sep 17 00:00:00 2001 From: hdx Date: Wed, 6 Nov 2024 17:42:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(createCanvasContextAsync):=20setup=20?= =?UTF-8?q?=E5=BA=94=E9=80=9A=E8=BF=87=20getCurrentInstance()=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/component/canvas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/component/canvas.md b/docs/component/canvas.md index 31864c12..3e9de67c 100644 --- a/docs/component/canvas.md +++ b/docs/component/canvas.md @@ -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; -- GitLab