程控源调整

This commit is contained in:
caozehui
2026-06-18 10:01:39 +08:00
parent 4415eb30b2
commit cd51cfb052
5 changed files with 540 additions and 265 deletions

View File

@@ -45,6 +45,7 @@ import { useTabsStore } from '@/stores/modules/tabs'
import { useGlobalStore } from '@/stores/modules/global'
import { useKeepAliveStore } from '@/stores/modules/keepAlive'
import { useRoute, useRouter } from 'vue-router'
import mittBus, { TAB_CLOSED_EVENT } from '@/utils/mittBus'
const route = useRoute()
const router = useRouter()
@@ -73,6 +74,7 @@ const maximize = () => {
// Close Current
const closeCurrentTab = () => {
if (route.meta.isAffix) return
mittBus.emit(TAB_CLOSED_EVENT, route.fullPath)
tabStore.removeTabs(route.fullPath)
}

View File

@@ -31,6 +31,7 @@ import { useTabsStore } from '@/stores/modules/tabs'
import { useAuthStore } from '@/stores/modules/auth'
import { TabPaneName, TabsPaneContext } from 'element-plus'
import MoreButton from './components/MoreButton.vue'
import mittBus, { TAB_CLOSED_EVENT } from '@/utils/mittBus'
const route = useRoute()
const router = useRouter()
@@ -110,6 +111,7 @@ const tabClick = (tabItem: TabsPaneContext) => {
// Remove Tab
const tabRemove = (fullPath: TabPaneName) => {
mittBus.emit(TAB_CLOSED_EVENT, fullPath as string)
tabStore.removeTabs(fullPath as string, fullPath == route.fullPath || '/machine/testScriptAdd' == route.fullPath)
}
</script>