From 70d057ce236b8b437fe7b8bb9f3be910b9facec9 Mon Sep 17 00:00:00 2001 From: chengqian Date: Tue, 15 Sep 2026 20:23:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=E4=BC=98=E5=8C=96=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/tenant/src/styles/main.css | 42 +++++ .../src/views/service/playground/ChatTab.vue | 41 +---- .../src/views/service/playground/VideoTab.vue | 143 ++++++++++++------ 3 files changed, 143 insertions(+), 83 deletions(-) diff --git a/web/tenant/src/styles/main.css b/web/tenant/src/styles/main.css index faa91ca..980772c 100644 --- a/web/tenant/src/styles/main.css +++ b/web/tenant/src/styles/main.css @@ -257,6 +257,48 @@ body.modal-open { @apply mt-1 text-xs text-red-500; } +/* ============ Playground 输入容器 ============ */ +/* 把附件片、输入框、操作按钮收进同一个圆角盒子,聚焦时整块高亮。 + 对话、视频两个 Tab 共用,故放在全局而非某个组件的 scoped 里。 */ +.input-shell { + border: 1px solid #e5e7eb; + border-radius: 1rem; + background: #fff; + padding: 0.625rem 0.75rem 0.5rem; + transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease; +} +/* 聚焦与拖拽时整块高亮,而不是只高亮里面的 textarea */ +.input-shell:focus-within { + border-color: rgba(20, 184, 166, 0.55); + box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.09); +} +.input-shell-dragging { + border-color: #2dd4bf; + border-style: dashed; + background: rgba(240, 253, 250, 0.6); +} + +/* 输入区内的小工具按钮(附件 / 清空 等) */ +.input-tool { + display: inline-flex; + align-items: center; + gap: 0.25rem; + border-radius: 0.5rem; + padding: 0.25rem 0.5rem; + color: #6b7280; + font-size: 0.75rem; + line-height: 1.25rem; + transition: background-color 150ms ease, color 150ms ease; +} +.input-tool:hover:not(:disabled) { + background: #f3f4f6; + color: #0d9488; +} +.input-tool:disabled { + cursor: not-allowed; + color: #d1d5db; +} + /* ============ 液态玻璃效果 ============ */ /* 大面积磨砂(header、sticky 栏) */ .glass { diff --git a/web/tenant/src/views/service/playground/ChatTab.vue b/web/tenant/src/views/service/playground/ChatTab.vue index a1aa8d1..b25efd4 100644 --- a/web/tenant/src/views/service/playground/ChatTab.vue +++ b/web/tenant/src/views/service/playground/ChatTab.vue @@ -751,45 +751,8 @@ function clearChat() {