From d452738615e97b2ff309143455c2bc843b3988f9 Mon Sep 17 00:00:00 2001 From: hdx Date: Thu, 8 Aug 2024 17:06:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(AnimationFrame):=20=E5=90=88=E5=B9=B6=20re?= =?UTF-8?q?questAnimationFrame/cancelAnimationFrame=20=E4=B8=BA=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 13 ++----- .../animation-frame.test.js} | 2 +- .../animation-frame.uvue} | 0 .../request-animation-frame.test.js | 16 --------- .../request-animation-frame.uvue | 35 ------------------- 5 files changed, 4 insertions(+), 62 deletions(-) rename pages/API/{cancel-animation-frame/cancel-animation-frame.test.js => animation-frame/animation-frame.test.js} (86%) rename pages/API/{cancel-animation-frame/cancel-animation-frame.uvue => animation-frame/animation-frame.uvue} (100%) delete mode 100644 pages/API/request-animation-frame/request-animation-frame.test.js delete mode 100644 pages/API/request-animation-frame/request-animation-frame.uvue diff --git a/pages.json b/pages.json index 3c990062..3f36c28e 100644 --- a/pages.json +++ b/pages.json @@ -546,17 +546,10 @@ } }, { - "path": "pages/API/request-animation-frame/request-animation-frame", + "path": "pages/API/animation-frame/animation-frame", "group": "1,4,9,0", "style": { - "navigationBarTitleText": "requestAnimationFrame | 加入请求帧动画队列" - } - }, - { - "path": "pages/API/cancel-animation-frame/cancel-animation-frame", - "group": "1,4,9,1", - "style": { - "navigationBarTitleText": "cancelAnimationFrame | 取消已加入的帧动画队列" + "navigationBarTitleText": "AnimationFrame | 帧动画" } }, { @@ -2740,4 +2733,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/pages/API/cancel-animation-frame/cancel-animation-frame.test.js b/pages/API/animation-frame/animation-frame.test.js similarity index 86% rename from pages/API/cancel-animation-frame/cancel-animation-frame.test.js rename to pages/API/animation-frame/animation-frame.test.js index 4c8f184f..6e96a0a1 100644 --- a/pages/API/cancel-animation-frame/cancel-animation-frame.test.js +++ b/pages/API/animation-frame/animation-frame.test.js @@ -1,4 +1,4 @@ -const PAGE_PATH = '/pages/API/cancel-animation-frame/cancel-animation-frame' +const PAGE_PATH = '/pages/API/animation-frame/animation-frame' describe('API-cancelAnimationFrame', () => { let page diff --git a/pages/API/cancel-animation-frame/cancel-animation-frame.uvue b/pages/API/animation-frame/animation-frame.uvue similarity index 100% rename from pages/API/cancel-animation-frame/cancel-animation-frame.uvue rename to pages/API/animation-frame/animation-frame.uvue diff --git a/pages/API/request-animation-frame/request-animation-frame.test.js b/pages/API/request-animation-frame/request-animation-frame.test.js deleted file mode 100644 index 82dbcca6..00000000 --- a/pages/API/request-animation-frame/request-animation-frame.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const PAGE_PATH = '/pages/API/request-animation-frame/request-animation-frame' - -describe('API-requestAnimationFrame', () => { - let page - beforeAll(async () => { - page = await program.reLaunch(PAGE_PATH) - await page.waitFor(600); - }); - - it('requestAnimationFrame', async () => { - await page.callMethod('startRequestAnimationFrame') - await page.waitFor(100) - const data = await page.data() - expect(data.testFrameCount > 0).toBe(true) - }); -}); diff --git a/pages/API/request-animation-frame/request-animation-frame.uvue b/pages/API/request-animation-frame/request-animation-frame.uvue deleted file mode 100644 index 82580403..00000000 --- a/pages/API/request-animation-frame/request-animation-frame.uvue +++ /dev/null @@ -1,35 +0,0 @@ - - - - - -- GitLab