From 6eda37c8c9c7a77516993f7625066538d125f811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9D=A8?= <666> Date: Mon, 16 Dec 2024 09:55:48 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E6=B4=BB=E5=8A=A8=E7=9A=84=E6=96=B9=E5=BC=8F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/AixPPTist/src/store/slides.ts | 6 +++--- .../Editor/Toolbar/ElementStylePanel/Active/index.vue | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/renderer/src/AixPPTist/src/store/slides.ts b/src/renderer/src/AixPPTist/src/store/slides.ts index c86c7c7..d7a3bae 100644 --- a/src/renderer/src/AixPPTist/src/store/slides.ts +++ b/src/renderer/src/AixPPTist/src/store/slides.ts @@ -151,9 +151,9 @@ export const useSlidesStore = defineStore('slides', { for (const slide of slides) { if (slide.sectionTag) delete slide.sectionTag } - // const addIndex = this.slideIndex + 1 - this.slides.splice(this.slideIndex, 0, ...slides) - // this.slideIndex = addIndex + const addIndex = this.slideIndex + 1 + this.slides.splice(addIndex, 0, ...slides) + this.slideIndex = addIndex }, updateSlide(props: Partial, slideId?: string) { const slideIndex = slideId ? this.slides.findIndex(item => item.id === slideId) : this.slideIndex diff --git a/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/Active/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/Active/index.vue index 1294986..de3a244 100644 --- a/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/Active/index.vue +++ b/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/Active/index.vue @@ -45,9 +45,9 @@ - - -
+ + +
@@ -335,9 +335,10 @@ onMounted(() => { objItem.value = workItem.value[slideIndex.value] getCurrentPPtData() }) -watch(() => [workItem.value.length,slideIndex.value], (newVal,oldVal) => { +watch(() => [workItem.value.length,workItem.value[slideIndex.value]?.id], (newVal,oldVal) => { if(!objectsAreEqual(newVal,oldVal)) - getCurrentPPtData() + if(workItem.value[slideIndex.value]) + getCurrentPPtData() }) // watch(() => workItem.value.length, () => { // getCurrentPPtData()