fix:修改监听活动的方式;
This commit is contained in:
parent
2a11173874
commit
6eda37c8c9
|
@ -151,9 +151,9 @@ export const useSlidesStore = defineStore('slides', {
|
||||||
for (const slide of slides) {
|
for (const slide of slides) {
|
||||||
if (slide.sectionTag) delete slide.sectionTag
|
if (slide.sectionTag) delete slide.sectionTag
|
||||||
}
|
}
|
||||||
// const addIndex = this.slideIndex + 1
|
const addIndex = this.slideIndex + 1
|
||||||
this.slides.splice(this.slideIndex, 0, ...slides)
|
this.slides.splice(addIndex, 0, ...slides)
|
||||||
// this.slideIndex = addIndex
|
this.slideIndex = addIndex
|
||||||
},
|
},
|
||||||
updateSlide(props: Partial<Slide>, slideId?: string) {
|
updateSlide(props: Partial<Slide>, slideId?: string) {
|
||||||
const slideIndex = slideId ? this.slides.findIndex(item => item.id === slideId) : this.slideIndex
|
const slideIndex = slideId ? this.slides.findIndex(item => item.id === slideId) : this.slideIndex
|
||||||
|
|
|
@ -45,9 +45,9 @@
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<!-- // 推送作业 -->
|
<!-- // 推送作业 -->
|
||||||
<el-dialog v-model="dialogVisible" append-to-body :show-close="false" width="90%" height="500">
|
<el-dialog v-model="dialogVisible" append-to-body :show-close="false" width="85%" height="500">
|
||||||
<el-scrollbar height="550">
|
<el-scrollbar>
|
||||||
<div style="height: 550px;">
|
<div style="height: 75vh;">
|
||||||
<NewClassTsakAssign :currentCourse='currentCourse' @getData="getData" />
|
<NewClassTsakAssign :currentCourse='currentCourse' @getData="getData" />
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
@ -335,8 +335,9 @@ onMounted(() => {
|
||||||
objItem.value = workItem.value[slideIndex.value]
|
objItem.value = workItem.value[slideIndex.value]
|
||||||
getCurrentPPtData()
|
getCurrentPPtData()
|
||||||
})
|
})
|
||||||
watch(() => [workItem.value.length,slideIndex.value], (newVal,oldVal) => {
|
watch(() => [workItem.value.length,workItem.value[slideIndex.value]?.id], (newVal,oldVal) => {
|
||||||
if(!objectsAreEqual(newVal,oldVal))
|
if(!objectsAreEqual(newVal,oldVal))
|
||||||
|
if(workItem.value[slideIndex.value])
|
||||||
getCurrentPPtData()
|
getCurrentPPtData()
|
||||||
})
|
})
|
||||||
// watch(() => workItem.value.length, () => {
|
// watch(() => workItem.value.length, () => {
|
||||||
|
|
Loading…
Reference in New Issue