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 @@
工程档案 · 精准检索
@@ -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 {