From c8b8c92644044fba57ad157b464dd54153df7c5a Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Thu, 1 Jan 2026 22:53:06 +0800 Subject: [PATCH] =?UTF-8?q?style(DataBaseView):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E5=92=8C=E4=BF=A1=E6=81=AF=E7=9A=84=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化标题的显示方式,从 flex 布局改为 block 布局,并添加文本溢出处理 确保信息区域的弹性布局和最小宽度设置 --- web/src/views/DataBaseView.vue | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/web/src/views/DataBaseView.vue b/web/src/views/DataBaseView.vue index 8904f690..666486d5 100644 --- a/web/src/views/DataBaseView.vue +++ b/web/src/views/DataBaseView.vue @@ -238,7 +238,7 @@ import { useRouter, useRoute } from 'vue-router'; import { storeToRefs } from 'pinia'; import { useConfigStore } from '@/stores/config'; import { useDatabaseStore } from '@/stores/database'; -import { Database, FileDigit, Waypoints, Building2 } from 'lucide-vue-next'; +import { Database, FileDigit, Waypoints, Building2, DatabaseZap } from 'lucide-vue-next'; import { LockOutlined, InfoCircleOutlined, QuestionCircleOutlined, PlusOutlined } from '@ant-design/icons-vue'; import { typeApi } from '@/apis/knowledge_api'; import HeaderComponent from '@/components/HeaderComponent.vue'; @@ -381,7 +381,7 @@ const getKbTypeIcon = (type) => { const icons = { lightrag: Waypoints, chroma: FileDigit, - milvus: Building2 + milvus: DatabaseZap } return icons[type] || Database } @@ -760,14 +760,7 @@ onMounted(() => { .top { .info { h3 { - display: flex; - align-items: center; - gap: 8px; - flex-wrap: wrap; - - .kb-type-tag { - margin-left: auto; - } + display: block; } } } @@ -840,6 +833,9 @@ onMounted(() => { } .info { + flex: 1; + min-width: 0; + h3, p { margin: 0; color: var(--gray-10000); @@ -850,6 +846,9 @@ onMounted(() => { font-weight: 600; letter-spacing: -0.02em; line-height: 1.4; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } p { @@ -863,7 +862,7 @@ onMounted(() => { font-weight: 400; .created-time-inline { - color: var(--gray-500); + color: var(--gray-700); font-size: 11px; font-weight: 400; background: var(--gray-50);