Jelajahi Sumber

fix插入PPT时标题渲染错页

cxmo 4 bulan lalu
induk
melakukan
41692d85a4

+ 6 - 4
src/views/ppt_manage/mixins/pptMixins.js

@@ -528,10 +528,12 @@ export default {
     //初始化内页标题
     initPageTitle(page){
         const index = this.pageList.findIndex((i) => i.id === page.id)
-        const dom = document.getElementById(`page_title__${index}`)
-        if(dom){
-            dom.innerHTML = page.title
-        }
+        this.$nextTick(()=>{
+            const dom = document.getElementById(`page_title__${index}`)
+            if(dom){
+                dom.innerHTML = page.title
+            }
+        })
     },
     //图表,表格数据统一加载,不按照页
     async initPPTAllPage(pageList){

+ 0 - 1
src/views/ppt_manage/newVersion/pptEditor.vue

@@ -825,7 +825,6 @@ export default {
               behavior: 'smooth'
           }) */
           const pptEditorDom = document.getElementById('pptEditor')
-          console.log('开始滑动')
           pptEditorDom.scrollTo({
             top:height*index,
               left:0,