fix: SFTP标签页离开后返回刷新状态丢失问题

This commit is contained in:
liumangmang
2026-03-30 16:18:00 +08:00
parent 78e6fc3e47
commit e895124831
3 changed files with 69 additions and 3 deletions

View File

@@ -190,8 +190,10 @@ function handleSftpTabClose(tabId: string, connectionId: number, event: Event) {
<div v-if="keepTerminalWorkspaceMounted" v-show="showTerminalWorkspace" class="h-full">
<TerminalWorkspaceView :visible="showTerminalWorkspace" />
</div>
<RouterView v-slot="{ Component }">
<component :is="Component" v-if="!showTerminalWorkspace" />
<RouterView v-slot="{ Component }">
<keep-alive :include="['SftpView']" :max="10">
<component :is="Component" v-if="!showTerminalWorkspace" :key="$route.fullPath" />
</keep-alive>
</RouterView>
</main>
</div>