From d955509972691ceaeb13bea2ae1be15cec4cbce9 Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Tue, 5 Dec 2023 21:12:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=A7=E8=A1=8C=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E5=8A=A8=E7=94=BB=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Editor/Toolbar/ElementAnimationPanel.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/Editor/Toolbar/ElementAnimationPanel.vue b/src/views/Editor/Toolbar/ElementAnimationPanel.vue index 4de5cabd..ff42b55f 100644 --- a/src/views/Editor/Toolbar/ElementAnimationPanel.vue +++ b/src/views/Editor/Toolbar/ElementAnimationPanel.vue @@ -107,9 +107,13 @@ - + + @@ -250,6 +254,7 @@ const runAnimation = (elId: string, effect: string, duration: number) => { elRef.addEventListener('animationend', handleAnimationEnd, { once: true }) } } + // 执行所有动画预览 const runAllAnimation = async () => { animateIn.value = !animateIn.value @@ -258,7 +263,7 @@ const runAllAnimation = async () => { const item = animationSequence.value[i] if (item.index !== 1 && item.trigger !== 'meantime') await new Promise(resolve => setTimeout(resolve, item.duration + 100)) runAnimation(item.elId, item.effect, item.duration) - if (i === animationSequence.value.length - 1) animateIn.value = false + if (i >= animationSequence.value.length - 1) animateIn.value = false } }