From 3a131c6f1d92be3ec2f1e050563721bd22343492 Mon Sep 17 00:00:00 2001 From: hdx Date: Wed, 7 Aug 2024 11:33:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(animation-frame):=20=E7=A7=BB=E9=99=A4=20u?= =?UTF-8?q?ni=20=E5=89=8D=E7=BC=80=EF=BC=8C=E4=BD=BF=E7=94=A8=E5=85=A8?= =?UTF-8?q?=E5=B1=80=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/cancel-animation-frame/cancel-animation-frame.uvue | 4 ++-- .../API/request-animation-frame/request-animation-frame.uvue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/API/cancel-animation-frame/cancel-animation-frame.uvue b/pages/API/cancel-animation-frame/cancel-animation-frame.uvue index dcc81c67..2f0062c5 100644 --- a/pages/API/cancel-animation-frame/cancel-animation-frame.uvue +++ b/pages/API/cancel-animation-frame/cancel-animation-frame.uvue @@ -23,13 +23,13 @@ }, methods: { startRequestAnimationFrame() { - this.taskId = uni.requestAnimationFrame((_ : number) => { + this.taskId = requestAnimationFrame((_ : number) => { this.testFrameCount++ this.startRequestAnimationFrame() }) }, stopRequestAnimationFrame() { - uni.cancelAnimationFrame(this.taskId) + cancelAnimationFrame(this.taskId) } } } diff --git a/pages/API/request-animation-frame/request-animation-frame.uvue b/pages/API/request-animation-frame/request-animation-frame.uvue index 04564a15..82580403 100644 --- a/pages/API/request-animation-frame/request-animation-frame.uvue +++ b/pages/API/request-animation-frame/request-animation-frame.uvue @@ -16,7 +16,7 @@ }, methods: { startRequestAnimationFrame() { - uni.requestAnimationFrame((_ : number) => { + requestAnimationFrame((_ : number) => { this.testFrameCount++; }) } -- GitLab