【更新】关闭多标签功能后,移除其他被缓存的标签

pull/98/head
小诺 2 years ago committed by 俞宝山
parent 6a74374f71
commit cc8c7b1e07

@ -60,7 +60,7 @@
<script>
import tool from '@/utils/tool'
import XnContextMenu from '@/components/XnContextMenu/index.vue'
import { iframeStore, keepAliveStore, viewTagsStore } from '@/store'
import {globalStore, iframeStore, keepAliveStore, viewTagsStore} from '@/store'
import { mapState, mapActions } from 'pinia'
export default {
@ -79,6 +79,7 @@
},
computed: {
...mapState(viewTagsStore, ['viewTags']),
...mapState(globalStore, ['layoutTagsOpen']),
tagList() {
return this.viewTags
}
@ -86,6 +87,9 @@
watch: {
$route(to) {
this.addViewTags(to)
},
layoutTagsOpen() {
this.closeOtherCacheTabs()
}
},
created() {
@ -161,7 +165,6 @@
// tag
addViewTags(route) {
this.activeKey = route.fullPath
if (route.name && !route.meta.fullpage) {
this.pushViewTags(route)
this.pushKeepLive(route.name)
@ -241,6 +244,13 @@
}
})
},
//
closeOtherCacheTabs () {
const tags = [...this.tagList]
tags.forEach((tag) => {
this.closeSelectedTag(tag, false)
})
},
// TAB
maximize() {
this.contextMenuVisible = false

@ -152,9 +152,6 @@
},
computed: {
...mapState(globalStore, ['sysBaseConfig']),
// captchaOpen() {
// return this.sysBaseConfig.SNOWY_SYS_DEFAULT_CAPTCHA_OPEN === 'true'
// }
},
watch: {
'config.theme': function (val) {

Loading…
Cancel
Save