From 0cca0d6c57c551f41fc05153ff74d89ed867ffe3 Mon Sep 17 00:00:00 2001 From: zxc <1171051090@qq.com> Date: Sun, 11 Aug 2024 14:17:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B8=90=E5=8F=98=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=9C=A8=E5=88=87=E6=8D=A2=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E5=90=8E=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue | 5 ++++- src/views/Editor/Toolbar/SlideDesignPanel.vue | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue b/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue index 406ea2c9..f26717ff 100644 --- a/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue +++ b/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue @@ -196,7 +196,10 @@ const updateFillType = (type: 'gradient' | 'fill') => { slidesStore.removeElementProps({ id: handleElementId.value, propName: 'gradient' }) addHistorySnapshot() } - else updateElement({ gradient: gradient.value }) + else { + currentGradientIndex.value = 0 + updateElement({ gradient: gradient.value }) + } } // 设置渐变填充 diff --git a/src/views/Editor/Toolbar/SlideDesignPanel.vue b/src/views/Editor/Toolbar/SlideDesignPanel.vue index 6fe33468..44f71326 100644 --- a/src/views/Editor/Toolbar/SlideDesignPanel.vue +++ b/src/views/Editor/Toolbar/SlideDesignPanel.vue @@ -388,6 +388,7 @@ const updateBackgroundType = (type: SlideBackgroundType) => { rotate: 0, }, } + currentGradientIndex.value = 0 slidesStore.updateSlide({ background: newBackground }) } addHistorySnapshot()