diff --git a/frontend/src/App.vue b/frontend/src/App.vue index fc15845..8e9555f 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -13,7 +13,7 @@ aria-label="切换导航菜单" @click="drawerOpen = !drawerOpen" > - + @@ -159,7 +159,14 @@ const drawerOpen = ref(false); const activeMeta = computed(() => navMap[activeKey.value] ?? navItems[0]); const currentComponent = computed(() => activeMeta.value.component); -const { state: appState, refreshConfig, startHealthPolling, stopHealthPolling } = useAppState(); +const { + state: appState, + refreshConfig, + startHealthPolling, + stopHealthPolling, + startIngestStatusSync, + stopIngestStatusSync +} = useAppState(); const rootPathDisplay = computed(() => appState.config.basePath || '未配置工作根目录'); @@ -182,6 +189,8 @@ function selectNav(key: NavKey) { onMounted(() => { startHealthPolling(); + // 外壳持有导入任务状态同步:离开导入页后仍能如实更新导航指示灯。 + startIngestStatusSync(); // 顶部条与侧边栏需要真实 basePath,主动拉取一次(各面板也会各自刷新)。 void refreshConfig().catch(() => { /* 配置加载失败不阻塞外壳渲染,各面板会显示未配置状态 */ @@ -190,6 +199,7 @@ onMounted(() => { onUnmounted(() => { stopHealthPolling(); + stopIngestStatusSync(); }); @@ -197,6 +207,7 @@ onUnmounted(() => { .console-shell { display: flex; width: 100%; + max-width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; diff --git a/frontend/src/components/IngestTab.vue b/frontend/src/components/IngestTab.vue index 4003180..426e9cc 100644 --- a/frontend/src/components/IngestTab.vue +++ b/frontend/src/components/IngestTab.vue @@ -115,7 +115,7 @@ :disabled="!canStart" @click="startIngest" > - + 执行一键入库