程控源调整
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user