From f14ebb9f0cb55be4c2a1602cee2d04f8c18426ed Mon Sep 17 00:00:00 2001 From: bakaECC <1064071566@qq.com> Date: Wed, 10 Dec 2025 18:06:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=BB=9A=E5=8A=A8=E6=9D=A1?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91=E4=B8=8E=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/chat_layout.vue | 45 +++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/src/layout/chat_layout.vue b/src/layout/chat_layout.vue index 34d8b96..dd8e320 100644 --- a/src/layout/chat_layout.vue +++ b/src/layout/chat_layout.vue @@ -63,7 +63,7 @@
@@ -386,7 +386,7 @@ ? '输入关键词搜索图片(实时搜索)...' : '请输入工程参数、需求或问题...' " - class="composer-textarea" + :class="['composer-textarea', { 'show-scrollbar': showTextareaScrollbar }]" @keydown="handleKeydown" :disabled="loading" /> @@ -622,7 +622,7 @@
- 🔍 文档检索模式 + 文档检索模式

工程档案 · 精准检索

@@ -1207,7 +1207,7 @@ ? '输入关键词搜索图片(实时搜索)...' : '请输入工程参数、需求或问题...' " - class="composer-textarea" + :class="['composer-textarea', { 'show-scrollbar': showTextareaScrollbar }]" @keydown="handleKeydown" :disabled="loading" /> @@ -1854,6 +1854,11 @@ const isSingleLine = computed(() => { return !inputText.value.includes('\n') && inputText.value.length < 50 }) +const showTextareaScrollbar = computed(() => { + const lines = inputText.value.split(/\r?\n/) + return lines.length > 2 +}) + const guidePrompts = [ { id: 'knowledge-base', @@ -3518,12 +3523,15 @@ function terminateProcess(msg, msgIndex) { justify-content: space-between; gap: 16px; margin-bottom: 16px; + flex-wrap: nowrap; + white-space: nowrap; } .search-head__left { display: flex; align-items: center; gap: 12px; + flex-wrap: nowrap; } .mode-pill { @@ -3544,12 +3552,14 @@ function terminateProcess(msg, msgIndex) { font-size: 16px; color: hsl(var(--foreground)); line-height: 1.2; + white-space: nowrap; } .head-desc { margin-top: 2px; font-size: 12px; color: hsl(var(--muted-foreground)); + white-space: nowrap; } .head-stats { @@ -4386,6 +4396,29 @@ function terminateProcess(msg, msgIndex) { padding: 0; line-height: 1.6; text-align: left; + overflow-y: hidden; + scrollbar-width: none; + -ms-overflow-style: none; +} + +.composer-textarea :deep(.el-textarea__inner::-webkit-scrollbar) { + width: 0; + height: 0; +} + +.composer-textarea.show-scrollbar :deep(.el-textarea__inner) { + overflow-y: auto; + scrollbar-width: thin; +} + +.composer-textarea.show-scrollbar :deep(.el-textarea__inner::-webkit-scrollbar) { + width: 6px; + height: 6px; +} + +.composer-textarea.show-scrollbar :deep(.el-textarea__inner::-webkit-scrollbar-thumb) { + background: hsla(220, 20%, 60%, 0.3); + border-radius: 999px; } .composer-textarea :deep(.el-textarea__inner):focus {