fix: SFTP标签页离开后返回刷新状态丢失问题
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: 'SftpView' })
|
||||
import { ref, computed, watch, onBeforeUnmount } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useToast } from 'vue-toast-notification'
|
||||
|
||||
Reference in New Issue
Block a user