From c286db68b1fb9015638f39bf6806a36964ed7270 Mon Sep 17 00:00:00 2001 From: Marcus <1922576605@qq.com> Date: Fri, 22 May 2026 17:02:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=BB=9A=E5=8A=A8=E6=9D=A1=E6=A0=B7=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B8=83=E5=B1=80=E5=92=8C=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/css/tailwind.css | 35 ++++++++++++++++++++ app/components/home/OcsConfigCard.vue | 5 +-- app/components/layout/AppHeader.vue | 11 ++++-- app/components/ui/scroll-area/ScrollArea.vue | 33 ++++++++++++++++++ app/components/ui/scroll-area/ScrollBar.vue | 27 +++++++++++++++ app/components/ui/scroll-area/index.ts | 2 ++ app/interfaces/answer.ts | 7 +++- app/layouts/default.vue | 14 +++++--- app/services/answer_service.ts | 1 - app/stores/answer.ts | 5 +-- 10 files changed, 125 insertions(+), 15 deletions(-) create mode 100644 app/components/ui/scroll-area/ScrollArea.vue create mode 100644 app/components/ui/scroll-area/ScrollBar.vue create mode 100644 app/components/ui/scroll-area/index.ts diff --git a/app/assets/css/tailwind.css b/app/assets/css/tailwind.css index f51bcaf..47837c1 100644 --- a/app/assets/css/tailwind.css +++ b/app/assets/css/tailwind.css @@ -116,13 +116,48 @@ @layer base { * { @apply border-border outline-ring/50; + scrollbar-width: thin; + scrollbar-color: color-mix(in oklch, var(--foreground) 28%, transparent) + transparent; } + body { @apply bg-background text-foreground; @apply font-sans; } + button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; } + + /* Chrome / Edge / Safari */ + *::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + *::-webkit-scrollbar-track { + background: transparent; + } + + *::-webkit-scrollbar-thumb { + background: color-mix(in oklch, var(--foreground) 22%, transparent); + border-radius: 999px; + } + + *::-webkit-scrollbar-thumb:hover { + background: color-mix(in oklch, var(--foreground) 38%, transparent); + } + + /* 去掉滚动条两头的箭头按钮 */ + *::-webkit-scrollbar-button { + display: none; + width: 0; + height: 0; + } + + *::-webkit-scrollbar-corner { + background: transparent; + } } diff --git a/app/components/home/OcsConfigCard.vue b/app/components/home/OcsConfigCard.vue index 45f67f0..501a341 100644 --- a/app/components/home/OcsConfigCard.vue +++ b/app/components/home/OcsConfigCard.vue @@ -68,8 +68,9 @@ const copyConfig = async () => {
{{ configText }}
+ class="max-h-120 overflow-auto rounded-2xl bg-muted p-4 text-xs leading-5 text-muted-foreground" + >{{ configText }} +
diff --git a/app/components/layout/AppHeader.vue b/app/components/layout/AppHeader.vue index 7b00826..abef252 100644 --- a/app/components/layout/AppHeader.vue +++ b/app/components/layout/AppHeader.vue @@ -1,6 +1,11 @@