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 } }