去掉页签的右键刷新按钮
This commit is contained in:
@@ -19,10 +19,10 @@
|
|||||||
<div style="margin: 4px 4px 0;">
|
<div style="margin: 4px 4px 0;">
|
||||||
<transition name="page-toggle">
|
<transition name="page-toggle">
|
||||||
<keep-alive v-if="multipage" :include="includedComponents">
|
<keep-alive v-if="multipage" :include="includedComponents">
|
||||||
<router-view v-if="reloadFlag"/>
|
<router-view />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<router-view v-if="reloadFlag"/>
|
<router-view />
|
||||||
</template>
|
</template>
|
||||||
</transition>
|
</transition>
|
||||||
<!-- iframe页 -->
|
<!-- iframe页 -->
|
||||||
@@ -30,8 +30,7 @@
|
|||||||
v-for="item in hasOpenComponentsArr"
|
v-for="item in hasOpenComponentsArr"
|
||||||
:key="item.name"
|
:key="item.name"
|
||||||
:is="item.name"
|
:is="item.name"
|
||||||
v-show="$route.path === item.path"
|
v-show="$route.path === item.path">
|
||||||
v-if="reloadIframeFlag">
|
|
||||||
</component>
|
</component>
|
||||||
</div>
|
</div>
|
||||||
</global-layout>
|
</global-layout>
|
||||||
@@ -61,13 +60,10 @@
|
|||||||
activePage: '',
|
activePage: '',
|
||||||
menuVisible: false,
|
menuVisible: false,
|
||||||
menuItemList: [
|
menuItemList: [
|
||||||
{ key: '4', icon: 'reload', text: '刷 新' },
|
|
||||||
{ key: '1', icon: 'arrow-left', text: '关闭左侧' },
|
{ key: '1', icon: 'arrow-left', text: '关闭左侧' },
|
||||||
{ key: '2', icon: 'arrow-right', text: '关闭右侧' },
|
{ key: '2', icon: 'arrow-right', text: '关闭右侧' },
|
||||||
{ key: '3', icon: 'close', text: '关闭其它' }
|
{ key: '3', icon: 'close', text: '关闭其它' }
|
||||||
],
|
],
|
||||||
reloadFlag:true,
|
|
||||||
reloadIframeFlag:true,
|
|
||||||
componentsArr: []
|
componentsArr: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -152,12 +148,10 @@
|
|||||||
this.changeTitle(waitRouter.meta.title)
|
this.changeTitle(waitRouter.meta.title)
|
||||||
},
|
},
|
||||||
'multipage': function(newVal) {
|
'multipage': function(newVal) {
|
||||||
if(this.reloadFlag){
|
|
||||||
if (!newVal) {
|
if (!newVal) {
|
||||||
this.linkList = [this.$route.fullPath]
|
this.linkList = [this.$route.fullPath]
|
||||||
this.pageList = [this.$route]
|
this.pageList = [this.$route]
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
//从单页模式切换回多页模式后首页要居第一位
|
//从单页模式切换回多页模式后首页要居第一位
|
||||||
device() {
|
device() {
|
||||||
@@ -301,9 +295,6 @@
|
|||||||
case '3':
|
case '3':
|
||||||
this.closeOthers(pageKey)
|
this.closeOthers(pageKey)
|
||||||
break
|
break
|
||||||
case '4':
|
|
||||||
this.routeReload(pageKey)
|
|
||||||
break
|
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -384,24 +375,6 @@
|
|||||||
this.activePage = key
|
this.activePage = key
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//路由刷新
|
|
||||||
routeReload(pageKey){
|
|
||||||
if(pageKey.indexOf('/system/plugins')>-1) {
|
|
||||||
//从iframe缓存中关闭对应的页面
|
|
||||||
this.reloadIframeFlag = false
|
|
||||||
this.$nextTick(()=>{
|
|
||||||
this.reloadIframeFlag = true
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.reloadFlag = false
|
|
||||||
let ToggleMultipage = "ToggleMultipage"
|
|
||||||
this.$store.dispatch(ToggleMultipage,false)
|
|
||||||
this.$nextTick(()=>{
|
|
||||||
this.$store.dispatch(ToggleMultipage,true)
|
|
||||||
this.reloadFlag = true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user