|
@@ -69,8 +69,9 @@ export default{
|
|
|
'click-title-outside':{
|
|
|
bind(el,binding){
|
|
|
const clickHandle = (e)=>{
|
|
|
+ e.preventDefault()
|
|
|
//点击标题区域和标题设置之外的地方,退出标题编辑模式
|
|
|
- if(el.contains(e.target)||NodeCheck(e.target,'title-edit-box')||NodeCheck(e.target,'title-editor')){
|
|
|
+ if(NodeCheck(e.target,'title-edit-box')||NodeCheck(e.target,'title-editor')){
|
|
|
return false
|
|
|
}
|
|
|
if(binding.value && typeof binding.value === 'function'){
|
|
@@ -102,7 +103,21 @@ export default{
|
|
|
}
|
|
|
//如果点击的页不是当前页,将点击页切换至当前页
|
|
|
if(this.currentItem.id!==item.id){
|
|
|
- this.changeCurrentItem(item)
|
|
|
+ //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
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
//this.isEditTitle = !this.isEditTitle
|
|
|
this.isEditTitle = true
|