feat: 在路由切换时保持终端的存活

Related to #5
This commit is contained in:
Baobhan Sith
2025-05-03 13:39:36 +08:00
parent f76debc59c
commit 430aac8512
+6 -1
View File
@@ -284,7 +284,12 @@ const isElementVisibleAndFocusable = (element: HTMLElement): boolean => {
</header>
<main>
<RouterView /> <!-- 路由对应的组件将在这里渲染 -->
<!-- 使用 KeepAlive 包裹 RouterView并指定缓存 WorkspaceView -->
<RouterView v-slot="{ Component }">
<KeepAlive include="WorkspaceView">
<component :is="Component" />
</KeepAlive>
</RouterView>
</main>
<!-- 添加全局通知显示 -->