feat(layout): 添加布局容器折叠状态控制功能
- 在 LayoutContainer 组件中新增 isCollapse 属性用于控制折叠状态 - 将组件内部的默认折叠状态改为根据属性值动态设置 - 更新多个视图组件以传递默认折叠配置 - 增加左侧最小宽度从 260 调整为 280 以优化显示效果 - 移除思维导图页面的 LayoutContainer 包装以简化结构 - 在聊天界面 PC 版中调整导出按钮位置到标题栏区域v3.2
parent
b299d42e7c
commit
8c6ca1206f
|
|
@ -42,15 +42,19 @@ const props = defineProps({
|
||||||
resizable: Boolean,
|
resizable: Boolean,
|
||||||
minLeftWidth: {
|
minLeftWidth: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 260,
|
default: 280,
|
||||||
},
|
},
|
||||||
maxLeftWidth: {
|
maxLeftWidth: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 400,
|
default: 400,
|
||||||
},
|
},
|
||||||
|
isCollapse: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const isCollapse = ref(true)
|
const isCollapse = ref(props.isCollapse)
|
||||||
const leftWidth = ref(props.minLeftWidth)
|
const leftWidth = ref(props.minLeftWidth)
|
||||||
const isResizing = ref(false)
|
const isResizing = ref(false)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<LayoutContainer showCollapse resizable class="application-manage">
|
<LayoutContainer showCollapse resizable :isCollapse="true" class="application-manage">
|
||||||
<template #left>
|
<template #left>
|
||||||
<h4 class="p-12-16 pb-0 mt-12">{{ $t('views.application.title') }}</h4>
|
<h4 class="p-12-16 pb-0 mt-12">{{ $t('views.application.title') }}</h4>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,28 @@
|
||||||
<h1 style="font-size: 18px; font-weight: 600; margin: 0;">AI-RAG</h1>
|
<h1 style="font-size: 18px; font-weight: 600; margin: 0;">AI-RAG</h1>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; align-items: center;">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -119,26 +141,6 @@
|
||||||
<span v-if="paginationConfig.total" class="lighter">
|
<span v-if="paginationConfig.total" class="lighter">
|
||||||
{{ paginationConfig.total }} {{ $t('chat.question_count') }}
|
{{ paginationConfig.total }} {{ $t('chat.question_count') }}
|
||||||
</span>
|
</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>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<LayoutContainer showCollapse resizable class="knowledge-manage">
|
<LayoutContainer showCollapse resizable :isCollapse="true" class="knowledge-manage">
|
||||||
<template #left>
|
<template #left>
|
||||||
<h4 class="p-12-16 pb-0 mt-12">{{ $t('views.knowledge.title') }}</h4>
|
<h4 class="p-12-16 pb-0 mt-12">{{ $t('views.knowledge.title') }}</h4>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<LayoutContainer class="mindmap-container">
|
<div class="mindmap-container">
|
||||||
<template #left>
|
|
||||||
<h4 class="p-12-16 pb-0 mt-12">思维导图</h4>
|
|
||||||
</template>
|
|
||||||
<div class="mindmap-content">
|
<div class="mindmap-content">
|
||||||
<iframe
|
<iframe
|
||||||
:src="mindmapUrl"
|
:src="mindmapUrl"
|
||||||
|
|
@ -10,11 +7,10 @@
|
||||||
title="思维导图"
|
title="思维导图"
|
||||||
></iframe>
|
></iframe>
|
||||||
</div>
|
</div>
|
||||||
</LayoutContainer>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import LayoutContainer from '@/components/layout-container/index.vue'
|
|
||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import systemConfigApi from '@/api/system-settings/system-config'
|
import systemConfigApi from '@/api/system-settings/system-config'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<LayoutContainer showCollapse class="model-manage">
|
<LayoutContainer showCollapse :isCollapse="true" class="model-manage">
|
||||||
<template #left>
|
<template #left>
|
||||||
<h4 class="p-12-16 pb-0 mt-12">{{ $t('views.model.provider') }}</h4>
|
<h4 class="p-12-16 pb-0 mt-12">{{ $t('views.model.provider') }}</h4>
|
||||||
<ProviderComponent
|
<ProviderComponent
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<LayoutContainer showCollapse resizable class="tool-manage">
|
<LayoutContainer showCollapse resizable :isCollapse="true" class="tool-manage">
|
||||||
<template #left>
|
<template #left>
|
||||||
<h4 class="p-12-16 pb-0 mt-12">{{ $t('views.tool.title') }}</h4>
|
<h4 class="p-12-16 pb-0 mt-12">{{ $t('views.tool.title') }}</h4>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue