refactor: 统一 DiffAnnotationPanel 布局结构

优化内容:
- 移除 DiffAnnotationPanel 的全屏独占模式
- 将 DiffAnnotationPanel 整合到统一的页面布局系统中
- GlobalSidebar 现在在所有页面保持显示
- 更新 MainContent 条件渲染逻辑,排除 diffAnnotation 页面
- 简化布局代码结构,移除不必要的 template 包裹

变更影响:
- DiffAnnotationPanel 现在与其他页面使用一致的布局方式
- 提升代码可维护性和一致性
- 用户体验更统一
This commit is contained in:
empty
2026-01-12 02:44:02 +08:00
parent 923641c5c1
commit 97e593c145

View File

@@ -1,21 +1,18 @@
<template>
<div class="flex h-screen w-full bg-slate-950 overflow-hidden">
<!-- 全局导航侧边栏 -->
<GlobalSidebar v-if="currentPage !== 'diffAnnotation'" />
<GlobalSidebar />
<!-- 主体区域 -->
<main class="flex-1 flex overflow-hidden relative">
<!-- 差异标注页面全屏独占 -->
<DiffAnnotationPanel v-if="currentPage === 'diffAnnotation'" />
<!-- 持久化布局面板 -->
<template v-else>
<!-- 左侧/中间配置侧边栏 -->
<WriterPanel v-if="currentPage === 'writer'" />
<AnalysisPanel v-else-if="currentPage === 'analysis'" />
<ParadigmWriterPanel v-else-if="currentPage === 'paradigmWriter'" />
<ComparePanel v-else-if="currentPage === 'compare'" />
<ArticleRewritePanel v-else-if="currentPage === 'rewrite'" />
<DiffAnnotationPanel v-else-if="currentPage === 'diffAnnotation'" />
<DocumentsPanel
v-else-if="currentPage === 'documents'"
@toggle-version-panel="toggleVersionPanel"
@@ -24,8 +21,8 @@
<MaterialsPanel v-else-if="currentPage === 'materials'" />
<SettingsPanel v-else-if="currentPage === 'settings'" />
<!-- 右侧核心内容区compare rewrite 页面使用自己的内部布局 -->
<MainContent v-if="currentPage !== 'compare' && currentPage !== 'rewrite'" />
<!-- 右侧核心内容区comparerewrite diffAnnotation 页面使用自己的内部布局 -->
<MainContent v-if="currentPage !== 'compare' && currentPage !== 'rewrite' && currentPage !== 'diffAnnotation'" />
<!-- 侧滑浮层面板 (仅文稿页) -->
<DocumentVersionPanel
@@ -36,7 +33,6 @@
@close="showVersionPanel = false"
@restore="handleVersionRestore"
/>
</template>
</main>
</div>
</template>