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()