diff --git a/pages/component/general-event/transition-event.test.js b/pages/component/general-event/transition-event.test.js index 0d3453bf067f909ef91e279f47ba85bfe9814d2e..8e5a35aec879596aa1d122c3da42a7a9a7561e57 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 bbbab37e2753837c5e5a1871552f277b8b2df3be..49d2698542ebe9da59b168e8d4afe03ede975b6f 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')