From 472149790c6b6d2ccdd0411dbe8bf1ebafab5cae Mon Sep 17 00:00:00 2001 From: hdx Date: Thu, 8 Aug 2024 17:31:42 +0800 Subject: [PATCH] =?UTF-8?q?AnimationFrame:=20=E5=8F=96=E6=B6=88=E5=90=8E?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E4=B8=BA=E5=88=9D=E5=A7=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/animation-frame/animation-frame.uvue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/API/animation-frame/animation-frame.uvue b/pages/API/animation-frame/animation-frame.uvue index 2501cb80..4d1ea94c 100644 --- a/pages/API/animation-frame/animation-frame.uvue +++ b/pages/API/animation-frame/animation-frame.uvue @@ -15,9 +15,9 @@ return { title: 'AnimationFrame', taskId: 0, + fps: 0, lastTime: 0, frameCount: 0, - fps: 0, testFrameCount: 0 } }, @@ -40,7 +40,10 @@ this.startRequestAnimationFrame() }) }, - stopRequestAnimationFrame() { + stopRequestAnimationFrame() { + this.fps = 0 + this.lastTime = 0 + this.frameCount = 0 cancelAnimationFrame(this.taskId) } } -- GitLab