From 28f396fe6f23ff2b5bcc547a6813573d335e3010 Mon Sep 17 00:00:00 2001 From: hdx Date: Tue, 30 Jul 2024 15:05:41 +0800 Subject: [PATCH] =?UTF-8?q?create-canvas-context-async:=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=89=80=E6=9C=89=20context=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../child-canvas.uvue | 2 +- .../create-canvas-context-async.test.js | 2 +- .../create-canvas-context-async.uvue | 958 +++++++++++++++++- 3 files changed, 926 insertions(+), 36 deletions(-) diff --git a/pages/API/create-canvas-context-async/child-canvas.uvue b/pages/API/create-canvas-context-async/child-canvas.uvue index 408d89a7..e5381f51 100644 --- a/pages/API/create-canvas-context-async/child-canvas.uvue +++ b/pages/API/create-canvas-context-async/child-canvas.uvue @@ -15,7 +15,7 @@ return { isCanvasContextNull : false } }, - + mounted() { this.$nextTick(() => { uni.createCanvasContextAsync({ diff --git a/pages/API/create-canvas-context-async/create-canvas-context-async.test.js b/pages/API/create-canvas-context-async/create-canvas-context-async.test.js index 8b06db93..6144e53a 100644 --- a/pages/API/create-canvas-context-async/create-canvas-context-async.test.js +++ b/pages/API/create-canvas-context-async/create-canvas-context-async.test.js @@ -10,7 +10,7 @@ describe('create-canvas-context-async', () => { it('page canvas', async () => { await page.waitFor(100) const data = await page.data() - expect(data.isCanvasContextNull).toBe(true) + expect(data.testCreateCanvasContextAsyncSuccess).toBe(true) }) it('component canvas', async () => { diff --git a/pages/API/create-canvas-context-async/create-canvas-context-async.uvue b/pages/API/create-canvas-context-async/create-canvas-context-async.uvue index 27f3aa3b..ec6c30f8 100644 --- a/pages/API/create-canvas-context-async/create-canvas-context-async.uvue +++ b/pages/API/create-canvas-context-async/create-canvas-context-async.uvue @@ -1,52 +1,942 @@ \ No newline at end of file + + + -- GitLab