优化页签的右键刷新问题

This commit is contained in:
神话
2022-05-06 20:04:33 +08:00
parent ce896e105d
commit 464e6e16b0

View File

@@ -30,7 +30,8 @@
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>
@@ -66,6 +67,7 @@
{ key: '3', icon: 'close', text: '关闭其它' } { key: '3', icon: 'close', text: '关闭其它' }
], ],
reloadFlag:true, reloadFlag:true,
reloadIframeFlag:true,
componentsArr: [] componentsArr: []
} }
}, },
@@ -300,7 +302,7 @@
this.closeOthers(pageKey) this.closeOthers(pageKey)
break break
case '4': case '4':
this.routeReload() this.routeReload(pageKey)
break break
default: default:
break break
@@ -383,7 +385,14 @@
} }
}, },
//路由刷新 //路由刷新
routeReload(){ routeReload(pageKey){
if(pageKey.indexOf('/system/plugins')>-1) {
//从iframe缓存中关闭对应的页面
this.reloadIframeFlag = false
this.$nextTick(()=>{
this.reloadIframeFlag = true
})
} else {
this.reloadFlag = false this.reloadFlag = false
let ToggleMultipage = "ToggleMultipage" let ToggleMultipage = "ToggleMultipage"
this.$store.dispatch(ToggleMultipage,false) this.$store.dispatch(ToggleMultipage,false)
@@ -394,6 +403,7 @@
} }
} }
} }
}
</script> </script>
<style lang="less"> <style lang="less">