From 47d6309cba95b393237f509c750f9825c70a1f49 Mon Sep 17 00:00:00 2001 From: que01 Date: Wed, 14 Oct 2026 12:07:33 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E9=87=8D=E5=81=9A=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E9=A1=B5=E5=A4=B4=E5=B1=82=E7=BA=A7=E4=B8=8E=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 页头标题 24px 降到 20px,说明 14px 降到 13px,标题与说明间距 8px 收到 6px - 页头到主体间距从 24px 提到 32px,与卡片间 16px 拉开层级 - 说明文字增加 880px 最大宽度,长句不再横跨整行 - 页面标题与侧栏导航用词对齐:信任内容、业务提供项、小程序页面、能力插件 - 信任内容页说明文案精简到一行内 - 概览页对象主标题降到 18px,避免与页面标题同级 - design.md 同步字号表、页头规范与导航命名约定 --- apps/admin/design.md | 12 ++++++---- apps/admin/src/components/AdminPageHeader.tsx | 2 +- apps/admin/src/features/brand/BrandPage.tsx | 2 +- .../capabilities/CapabilitiesPage.tsx | 2 +- .../src/features/services/ServicesPage.tsx | 2 +- .../trust-content/TrustContentPage.tsx | 4 ++-- apps/admin/src/styles/admin.css | 24 ++++++++++++------- 7 files changed, 29 insertions(+), 19 deletions(-) diff --git a/apps/admin/design.md b/apps/admin/design.md index f89daf8..54844f4 100644 --- a/apps/admin/design.md +++ b/apps/admin/design.md @@ -76,8 +76,9 @@ | 角色 | 字号 | 字重 | 行高 | | ------------------ | ---- | ---- | ---- | -| 页面标题 | 24px | 600 | 1.35 | +| 页面标题 | 20px | 600 | 1.4 | | 区块/卡片标题 | 16px | 600 | 1.45 | +| 卡片内对象主标题 | 18px | 600 | 1.45 | | 强调正文、品牌名 | 15px | 600 | 1.5 | | 正文 | 14px | 400 | 1.5 | | 表单标签、次要正文 | 13px | 400 | 1.5 | @@ -99,7 +100,7 @@ | ---------------- | ------------ | | 页面内容区内边距 | 24px | | 内容最大宽度 | 1200px,居中 | -| 页面头部到主体 | 24px | +| 页面头部到主体 | 32px | | 卡片内边距 | 20px | | 卡片之间 | 16px | | 表单字段之间 | 16px | @@ -151,7 +152,10 @@ ### 页面头部 -统一通过 `AdminPageHeader` 渲染:页面标题 24px/600 + 可选副标题 14px 次要色 + 右侧操作区。底部间距 24px。页面内不得再手写标题层级。 +统一通过 `AdminPageHeader` 渲染:页面标题 20px/600 + 可选副标题 13px 次要色 + 右侧操作区。标题与副标题间距 6px,页头到主体 32px(明显大于卡片之间的 16px)。页面内不得再手写标题层级。 + +- 页面标题必须与侧栏导航用词一致,不额外添加「小程序内容:」这类前缀;页面职责写进副标题。 +- 副标题一句话讲清这一页做什么,最长不超过 2 行;能由页面内文案表达的细节不要重复写在这里。 ### 卡片 @@ -229,7 +233,7 @@ | 面板内小标题、表单分组 | `admin-subhead` | 15px / 600 | | 列表行、条目名称 | `admin-row-title` | 14px / 600 | -页面级标题只由 `AdminPageHeader` 输出(24px / 600),一个页面只出现一次。 +页面级标题只由 `AdminPageHeader` 输出(20px / 600),一个页面只出现一次。 ### 进度 diff --git a/apps/admin/src/components/AdminPageHeader.tsx b/apps/admin/src/components/AdminPageHeader.tsx index 73a06cd..0fc9890 100644 --- a/apps/admin/src/components/AdminPageHeader.tsx +++ b/apps/admin/src/components/AdminPageHeader.tsx @@ -11,7 +11,7 @@ export function AdminPageHeader({ }) { return (
-
+

{title}

{description ?

{description}

: null}
diff --git a/apps/admin/src/features/brand/BrandPage.tsx b/apps/admin/src/features/brand/BrandPage.tsx index f30d23d..49e729c 100644 --- a/apps/admin/src/features/brand/BrandPage.tsx +++ b/apps/admin/src/features/brand/BrandPage.tsx @@ -54,7 +54,7 @@ export function BrandPage() { {!brand.data ? null : ( <> void query.refetch()}> {query.data?.length ? ( diff --git a/apps/admin/src/features/services/ServicesPage.tsx b/apps/admin/src/features/services/ServicesPage.tsx index bc0de12..566de6e 100644 --- a/apps/admin/src/features/services/ServicesPage.tsx +++ b/apps/admin/src/features/services/ServicesPage.tsx @@ -92,7 +92,7 @@ export function ServicesPage() { onRetry={retry} > editor.beginOffering()}> diff --git a/apps/admin/src/features/trust-content/TrustContentPage.tsx b/apps/admin/src/features/trust-content/TrustContentPage.tsx index 71f54c8..e223439 100644 --- a/apps/admin/src/features/trust-content/TrustContentPage.tsx +++ b/apps/admin/src/features/trust-content/TrustContentPage.tsx @@ -57,8 +57,8 @@ export function TrustContentPage() { onRetry={() => void Promise.all([query.refetch(), workspace.refetch()])} > begin()}> 添加品牌内容 diff --git a/apps/admin/src/styles/admin.css b/apps/admin/src/styles/admin.css index e3db43c..e8bea3c 100644 --- a/apps/admin/src/styles/admin.css +++ b/apps/admin/src/styles/admin.css @@ -171,22 +171,28 @@ body { display: flex; align-items: flex-start; justify-content: space-between; - gap: 16px; - margin-bottom: 24px; + gap: 24px; + margin-bottom: 32px; +} + +.admin-page-header-text { + flex: 1 1 auto; + min-width: 0; } .admin-page-header-title { margin: 0; - font-size: 24px; + font-size: 20px; font-weight: 600; - line-height: 1.35; + line-height: 1.4; color: var(--admin-text); } .admin-page-header-description { - margin: 8px 0 0; - font-size: 14px; - line-height: 1.5; + margin: 6px 0 0; + max-width: 880px; + font-size: 13px; + line-height: 1.6; color: var(--admin-text-secondary); } @@ -495,9 +501,9 @@ body { .admin-brand-title { margin: 0; - font-size: 20px; + font-size: 18px; font-weight: 600; - line-height: 1.4; + line-height: 1.45; color: var(--admin-text); }