Browse Source

去掉自定义事件的阻止冒泡

cxmo 4 months ago
parent
commit
b4ea360bf2
1 changed files with 5 additions and 9 deletions
  1. 5 9
      src/views/ppt_manage/mixins/pptEditorMixins.js

+ 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