Bladeren bron

Merge branch 'demand-199-copy'

cxmo 4 maanden geleden
bovenliggende
commit
3230993e96

+ 5 - 9
src/views/ppt_manage/mixins/pptEditorMixins.js

@@ -69,7 +69,6 @@ export default{
     'click-title-outside':{
         bind(el,binding){
             const clickHandle = (e)=>{
-                e.preventDefault()
                 //点击标题区域和标题设置之外的地方,退出标题编辑模式
                 if(NodeCheck(e.target,'title-edit-box')||NodeCheck(e.target,'title-editor')){
                   return false
@@ -105,18 +104,15 @@ export default{
         if(this.currentItem.id!==item.id){
             //this.changeCurrentItem(item,'change')
             const {id} = item
-            //切换到其他活跃页的时候,需退出图层编辑模式
-            if(this.currentItem&&this.currentItem.id!==id){
             this.isEditLayer = false
             this.activeLayerEl = {}
-            
             this.isEditTitle = false
-            }
+            
             this.pageList.map((item,index)=>{
-            if(item.id===id){
-                this.currentItem = item
-                this.currentIndex = index
-            }
+                if(item.id===id){
+                    this.currentItem = item
+                    this.currentIndex = index
+                }
             })
         }
         //this.isEditTitle = !this.isEditTitle

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

@@ -529,10 +529,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){

+ 6 - 2
src/views/ppt_manage/newVersion/pptEditor.vue

@@ -54,7 +54,7 @@
                     <AddFormat @addPage="addPage($event,index)" :chooseModalId="chooseModalId"/>
                     <div class="ppt-item" :class="{'choose':currentItem.id===item.id}" 
                         v-loading="item.isUpdating" :element-loading-text="$t('Slides.updating_chart_loading')"
-                        @click="changeCurrentItem(item)">
+                        @click.stop="changeCurrentItem(item)">
                         <!-- 标题 -->
                         <!-- <div class="title-wrap" style="background-color: #999999;">
                             <input type="text" placeholder="单击输入标题" v-model="item.title"/> 
@@ -804,6 +804,11 @@ export default {
           
           this.isEditTitle = false
         }
+        //点击当前页时,退出标题编辑模式
+        if(this.currentItem&&this.currentItem.id===id){
+            this.isEditTitle = false
+            return 
+        }
         this.pageList.map((item,index)=>{
           if(item.id===id){
             this.currentItem = item
@@ -820,7 +825,6 @@ export default {
               behavior: 'smooth'
           }) */
           const pptEditorDom = document.getElementById('pptEditor')
-          console.log('开始滑动')
           pptEditorDom.scrollTo({
             top:height*index,
               left:0,

+ 6 - 1
src/views/ppt_manage/newVersion/pptEnEditor.vue

@@ -52,7 +52,7 @@
                 <AddFormat @addPage="addPage($event,index)" :chooseModalId="chooseModalId"/>
                 <div class="ppt-item" :class="{'choose':currentItem.id===item.id}" 
                   v-loading="item.isUpdating" :element-loading-text="$t('Slides.updating_chart_loading')"
-                  @click="changeCurrentItem(item)">
+                  @click.stop="changeCurrentItem(item)">
                     <!-- 标题 -->
                     <!-- <div class="title-wrap" style="left:8%;width:62%;">
                         <input type="text" :placeholder="$t('Slides.click_to_input_title')" v-model="item.title"/> 
@@ -794,6 +794,11 @@ export default {
 
           this.isEditTitle = false
         }
+        //点击当前页时,退出标题编辑模式
+        if(this.currentItem&&this.currentItem.id===id){
+            this.isEditTitle = false
+            return 
+        }
         this.pageList.map((item,index)=>{
           if(item.id===id){
             this.currentItem = item