feat: 修改主机额外配置.
This commit is contained in:
@@ -34,9 +34,9 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { TabItem } from './types/terminal.const';
|
||||
import { ref, onBeforeMount } from 'vue';
|
||||
import { ref, onBeforeMount, onUnmounted } from 'vue';
|
||||
import { TabType, InnerTabs, dictKeys } from './types/terminal.const';
|
||||
import { useDictStore, useTerminalStore } from '@/store';
|
||||
import { useCacheStore, useDictStore, useTerminalStore } from '@/store';
|
||||
import TerminalHeader from './components/layout/terminal-header.vue';
|
||||
import TerminalLeftSidebar from './components/layout/terminal-left-sidebar.vue';
|
||||
import TerminalRightSidebar from './components/layout/terminal-right-sidebar.vue';
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
const terminalStore = useTerminalStore();
|
||||
const dictStore = useDictStore();
|
||||
const cacheStore = useCacheStore();
|
||||
|
||||
const render = ref(false);
|
||||
const activeKey = ref(InnerTabs.NEW_CONNECTION.key);
|
||||
@@ -93,6 +94,11 @@
|
||||
await dictStore.loadKeys([...dictKeys]);
|
||||
});
|
||||
|
||||
// 卸载时清除 cache
|
||||
onUnmounted(() => {
|
||||
cacheStore.reset('authorizedHostKeys', 'authorizedHostIdentities');
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
Reference in New Issue
Block a user