Files

26 lines
903 B
Vue
Raw Permalink Normal View History

<!-- App.vue —— B1 归属。挂载三栏 AppShell + 教育科研覆盖层(步骤5;v-show 切换不卸载)。 -->
<script setup>
import { onMounted, onUnmounted } from 'vue';
import AppShell from './components/layout/AppShell.vue';
import EduWorkspace from './components/edu/EduWorkspace.vue';
import { useHealthStore } from './stores/health.js';
import { useAppStore } from './stores/app.js';
// FR-SHELL-007 首屏初始化:并行请求健康与 QA 元信息(失败不阻塞渲染)
const health = useHealthStore();
const appStore = useAppStore();
onMounted(() => {
health.start();
health.fetchQaInfo();
});
onUnmounted(() => {
health.stop();
});
</script>
<template>
<!-- 覆盖层语义(D1):两者始终挂载,仅 display 切换——RAG 会话/上传/滚动零丢失 -->
<AppShell v-show="appStore.isChat" />
<EduWorkspace v-show="appStore.isEdu" />
</template>