浏览代码

fix插入PPT时标题渲染错页

cxmo 4 月之前
父节点
当前提交
41692d85a4
共有 2 个文件被更改,包括 6 次插入5 次删除
  1. 6 4
      src/views/ppt_manage/mixins/pptMixins.js
  2. 0 1
      src/views/ppt_manage/newVersion/pptEditor.vue

+ 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,