From 2a6d70d4c4d28a29798b48f6100899cee473736b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A3=8A?= <1633537611@qq.com> Date: Wed, 17 Apr 2024 19:55:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0transition-end=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/general-event/transition-event.test.js | 5 +++++ pages/component/general-event/transition-event.uvue | 1 + 2 files changed, 6 insertions(+) diff --git a/pages/component/general-event/transition-event.test.js b/pages/component/general-event/transition-event.test.js index 0d3453bf..8e5a35ae 100644 --- a/pages/component/general-event/transition-event.test.js +++ b/pages/component/general-event/transition-event.test.js @@ -11,5 +11,10 @@ describe('transition event', () => { await page.callMethod('switchBtn') await page.waitFor(3000) expect(await page.data("onTransitionEndTriggr")).toBe(true) + await page.callMethod('switchBtn') + await page.waitFor(200) + await page.callMethod('switchBtn') + await page.waitFor(3000) + expect(await page.data("onTransitionEndTriggr")).toBe(true) }); }); diff --git a/pages/component/general-event/transition-event.uvue b/pages/component/general-event/transition-event.uvue index bbbab37e..49d26985 100644 --- a/pages/component/general-event/transition-event.uvue +++ b/pages/component/general-event/transition-event.uvue @@ -35,6 +35,7 @@ } else { this.isStart = false this.times = 0 + this.onTransitionEndTriggr = false this.buttonValue = "开启图片旋转" this.element!.style.setProperty('transform', 'rotate(' + this.times * 360 + 'deg)') this.element!.style.setProperty('transition-duration', '0ms') -- GitLab