feat(layout): 添加布局容器折叠状态控制功能

- 在 LayoutContainer 组件中新增 isCollapse 属性用于控制折叠状态
- 将组件内部的默认折叠状态改为根据属性值动态设置
- 更新多个视图组件以传递默认折叠配置
- 增加左侧最小宽度从 260 调整为 280 以优化显示效果
- 移除思维导图页面的 LayoutContainer 包装以简化结构
- 在聊天界面 PC 版中调整导出按钮位置到标题栏区域
v3.2
tanlianwang 2026-03-10 20:55:18 +08:00
parent b299d42e7c
commit 8c6ca1206f
7 changed files with 34 additions and 32 deletions

View File

@ -42,15 +42,19 @@ const props = defineProps({
resizable: Boolean,
minLeftWidth: {
type: Number,
default: 260,
default: 280,
},
maxLeftWidth: {
type: Number,
default: 400,
},
isCollapse: {
type: Boolean,
default: false,
},
})
const isCollapse = ref(true)
const isCollapse = ref(props.isCollapse)
const leftWidth = ref(props.minLeftWidth)
const isResizing = ref(false)

View File

@ -1,5 +1,5 @@
<template>
<LayoutContainer showCollapse resizable class="application-manage">
<LayoutContainer showCollapse resizable :isCollapse="true" class="application-manage">
<template #left>
<h4 class="p-12-16 pb-0 mt-12">{{ $t('views.application.title') }}</h4>

View File

@ -26,6 +26,28 @@
<h1 style="font-size: 18px; font-weight: 600; margin: 0;">AI-RAG</h1>
</div>
<div style="display: flex; align-items: center;">
<span class="flex align-center" v-if="currentRecordList.length">
<el-dropdown class="ml-8">
<AppIcon
iconName="app-export"
class="cursor"
:title="$t('chat.exportRecords')"
></AppIcon>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="exportMarkdown"
>{{ $t('common.export') }} Markdown</el-dropdown-item
>
<el-dropdown-item @click="exportHTML"
>{{ $t('common.export') }} HTML</el-dropdown-item
>
<el-dropdown-item @click="openPDFExport"
>{{ $t('common.export') }} PDF</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
</span>
</div>
</div>
</div>
@ -119,26 +141,6 @@
<span v-if="paginationConfig.total" class="lighter">
{{ paginationConfig.total }} {{ $t('chat.question_count') }}
</span>
<el-dropdown class="ml-8">
<AppIcon
iconName="app-export"
class="cursor"
:title="$t('chat.exportRecords')"
></AppIcon>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="exportMarkdown"
>{{ $t('common.export') }} Markdown</el-dropdown-item
>
<el-dropdown-item @click="exportHTML"
>{{ $t('common.export') }} HTML</el-dropdown-item
>
<el-dropdown-item @click="openPDFExport"
>{{ $t('common.export') }} PDF</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
</span>
</div>
</template>

View File

@ -1,5 +1,5 @@
<template>
<LayoutContainer showCollapse resizable class="knowledge-manage">
<LayoutContainer showCollapse resizable :isCollapse="true" class="knowledge-manage">
<template #left>
<h4 class="p-12-16 pb-0 mt-12">{{ $t('views.knowledge.title') }}</h4>

View File

@ -1,8 +1,5 @@
<template>
<LayoutContainer class="mindmap-container">
<template #left>
<h4 class="p-12-16 pb-0 mt-12">思维导图</h4>
</template>
<div class="mindmap-container">
<div class="mindmap-content">
<iframe
:src="mindmapUrl"
@ -10,11 +7,10 @@
title="思维导图"
></iframe>
</div>
</LayoutContainer>
</div>
</template>
<script setup lang="ts">
import LayoutContainer from '@/components/layout-container/index.vue'
import { ref, onMounted } from 'vue'
import systemConfigApi from '@/api/system-settings/system-config'

View File

@ -1,5 +1,5 @@
<template>
<LayoutContainer showCollapse class="model-manage">
<LayoutContainer showCollapse :isCollapse="true" class="model-manage">
<template #left>
<h4 class="p-12-16 pb-0 mt-12">{{ $t('views.model.provider') }}</h4>
<ProviderComponent

View File

@ -1,5 +1,5 @@
<template>
<LayoutContainer showCollapse resizable class="tool-manage">
<LayoutContainer showCollapse resizable :isCollapse="true" class="tool-manage">
<template #left>
<h4 class="p-12-16 pb-0 mt-12">{{ $t('views.tool.title') }}</h4>