From 2724d6f3ff4625f9d41b479efd04982807d2c30c Mon Sep 17 00:00:00 2001 From: stash Date: Thu, 29 Oct 2026 10:23:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(web):=20=E8=AE=A1=E6=95=B0=E8=A7=92?= =?UTF-8?q?=E6=A0=87=E6=94=B9=E5=9B=9E=E6=82=AC=E6=8C=82=E5=9C=A8=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E5=8F=B3=E4=B8=8A=E8=A7=92=EF=BC=8C=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=E5=9C=86=E8=A7=92=E6=81=A2=E5=A4=8D=2012px?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 角标:绝对定位 top -8 / right -18、16 高、8 圆角、12/700、危险色阴影(原来跟在标题后面占行内空间) - 标题前色条补 8px 右间距,标题起点与旧版一致 - 搜索框:圆角 6 → 12(旧版 card-box 的圆角) --- stash-web/src/App.css | 31 ++++++++++++++++++- .../src/components/content/SectionCard.tsx | 16 +++++----- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/stash-web/src/App.css b/stash-web/src/App.css index 4e26bbe..2ff9c20 100644 --- a/stash-web/src/App.css +++ b/stash-web/src/App.css @@ -94,6 +94,7 @@ .search-row > *:first-child, .search-row > *:first-child:focus-within { border-color: var(--su-border); + border-radius: var(--su-radius-md); box-shadow: var(--su-shadow-card); } @@ -216,6 +217,32 @@ margin-bottom: var(--su-space-4); } +.section-title-wrapper { + display: flex; + align-items: center; +} + +/* 角标是挂在标题右上角的绝对定位元素(旧版行为),不占行内宽度 */ +.section-title-box { + position: relative; + display: inline-flex; + align-items: center; +} + +.count-badge { + position: absolute; + top: -8px; + right: -18px; + height: 16px; + min-width: 16px; + padding: 0 4px; + border-radius: 8px; + box-shadow: 0 1px 3px color-mix(in srgb, var(--su-color-danger) 30%, transparent); + font-size: 12px; + font-weight: var(--su-font-weight-strong); + line-height: 1; +} + /* 旧版分区标题是 16/1.2,更多按钮是 24px 小方按钮 */ .section-header h2 { line-height: 1.2; @@ -229,7 +256,9 @@ .section-bar { width: 4px; height: 16px; - border-radius: var(--su-radius-pill); + margin-right: var(--su-space-2); + border-radius: 2px; + background-color: var(--su-color-primary); } /* ---------- 应用条目 ---------- */ diff --git a/stash-web/src/components/content/SectionCard.tsx b/stash-web/src/components/content/SectionCard.tsx index 81ce2c4..f3bf2c4 100644 --- a/stash-web/src/components/content/SectionCard.tsx +++ b/stash-web/src/components/content/SectionCard.tsx @@ -1,4 +1,4 @@ -import { Badge, Card, Icon, IconButton, Space, Title } from '@stash/ui' +import { Badge, Card, Icon, IconButton, Title } from '@stash/ui' import type { ReactNode } from 'react' /** @@ -19,13 +19,15 @@ export function SectionCard({ title, count, barColor, onMore, children }: Sectio return (
- + + + + {title} + + + + {onMore !== undefined && (