From 6a95f8280c972635b1f670cf3fe8595acda40c4d Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Sat, 28 Oct 2023 17:04:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=A8=E7=94=BB=E6=97=B6=E8=A2=AB=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E5=88=B0=E5=BC=82=E5=B8=B8=E7=8A=B6=E6=80=81=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Editor/Toolbar/ElementAnimationPanel.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/Editor/Toolbar/ElementAnimationPanel.vue b/src/views/Editor/Toolbar/ElementAnimationPanel.vue index c30b821a..69220c53 100644 --- a/src/views/Editor/Toolbar/ElementAnimationPanel.vue +++ b/src/views/Editor/Toolbar/ElementAnimationPanel.vue @@ -283,7 +283,9 @@ const updateElementAnimation = (type: AnimationType, effect: string) => { const animationItem = currentSlideAnimations.value.find(item => item.elId === handleElementId.value) const duration = animationItem?.duration || ANIMATION_DEFAULT_DURATION - runAnimation(handleElementId.value, effect, duration) + setTimeout(() => { + runAnimation(handleElementId.value, effect, duration) + }, 0) } const handleAnimationId = ref('') @@ -307,7 +309,9 @@ const addAnimation = (type: AnimationType, effect: string) => { animationPoolVisible.value = false addHistorySnapshot() - runAnimation(handleElementId.value, effect, ANIMATION_DEFAULT_DURATION) + setTimeout(() => { + runAnimation(handleElementId.value, effect, ANIMATION_DEFAULT_DURATION) + }, 0) } // 动画选择面板打开600ms后再移除遮罩层,否则打开面板后迅速滑入鼠标预览会导致抖动