style: 重做后台页头层级与页面命名

- 页头标题 24px 降到 20px,说明 14px 降到 13px,标题与说明间距 8px 收到 6px
- 页头到主体间距从 24px 提到 32px,与卡片间 16px 拉开层级
- 说明文字增加 880px 最大宽度,长句不再横跨整行
- 页面标题与侧栏导航用词对齐:信任内容、业务提供项、小程序页面、能力插件
- 信任内容页说明文案精简到一行内
- 概览页对象主标题降到 18px,避免与页面标题同级
- design.md 同步字号表、页头规范与导航命名约定
This commit is contained in:
que01 committed 2026-10-14 12:07:33 +08:00
1 parent ebab77057a
commit 47d6309cba
7 files changed
+29 -19

No files matched your search

+8 -4
View File
@@ -76,8 +76,9 @@
| 角色 | 字号 | 字重 | 行高 | | 角色 | 字号 | 字重 | 行高 |
| ------------------ | ---- | ---- | ---- | | ------------------ | ---- | ---- | ---- |
| 页面标题 | 24px | 600 | 1.35 | | 页面标题 | 20px | 600 | 1.4 |
| 区块/卡片标题 | 16px | 600 | 1.45 | | 区块/卡片标题 | 16px | 600 | 1.45 |
| 卡片内对象主标题 | 18px | 600 | 1.45 |
| 强调正文、品牌名 | 15px | 600 | 1.5 | | 强调正文、品牌名 | 15px | 600 | 1.5 |
| 正文 | 14px | 400 | 1.5 | | 正文 | 14px | 400 | 1.5 |
| 表单标签、次要正文 | 13px | 400 | 1.5 | | 表单标签、次要正文 | 13px | 400 | 1.5 |
@@ -99,7 +100,7 @@
| ---------------- | ------------ | | ---------------- | ------------ |
| 页面内容区内边距 | 24px | | 页面内容区内边距 | 24px |
| 内容最大宽度 | 1200px,居中 | | 内容最大宽度 | 1200px,居中 |
| 页面头部到主体 | 24px | | 页面头部到主体 | 32px |
| 卡片内边距 | 20px | | 卡片内边距 | 20px |
| 卡片之间 | 16px | | 卡片之间 | 16px |
| 表单字段之间 | 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-subhead` | 15px / 600 |
| 列表行、条目名称 | `admin-row-title` | 14px / 600 | | 列表行、条目名称 | `admin-row-title` | 14px / 600 |
页面级标题只由 `AdminPageHeader` 输出(24px / 600),一个页面只出现一次。 页面级标题只由 `AdminPageHeader` 输出(20px / 600),一个页面只出现一次。
### 进度 ### 进度
@@ -11,7 +11,7 @@ export function AdminPageHeader({
}) { }) {
return ( return (
<header className="admin-page-header"> <header className="admin-page-header">
<div> <div className="admin-page-header-text">
<h1 className="admin-page-header-title">{title}</h1> <h1 className="admin-page-header-title">{title}</h1>
{description ? <p className="admin-page-header-description">{description}</p> : null} {description ? <p className="admin-page-header-description">{description}</p> : null}
</div> </div>
+1 -1
View File
@@ -54,7 +54,7 @@ export function BrandPage() {
{!brand.data ? null : ( {!brand.data ? null : (
<> <>
<AdminPageHeader <AdminPageHeader
title="小程序工作台" title="小程序页面"
description={ description={
template.data?.description template.data?.description
? `先让访客理解你是谁、服务谁,以及为什么值得信任。${template.data.description}` ? `先让访客理解你是谁、服务谁,以及为什么值得信任。${template.data.description}`
@@ -14,7 +14,7 @@ export function CapabilitiesPage() {
return ( return (
<QueryState loading={query.isLoading} error={query.error} onRetry={() => void query.refetch()}> <QueryState loading={query.isLoading} error={query.error} onRetry={() => void query.refetch()}>
<AdminPageHeader <AdminPageHeader
title="能力管理" title="能力插件"
description="以经营者视角调整模板能力的开关与展示设置;保存后进入草稿,发布后生效。" description="以经营者视角调整模板能力的开关与展示设置;保存后进入草稿,发布后生效。"
/> />
{query.data?.length ? ( {query.data?.length ? (
@@ -92,7 +92,7 @@ export function ServicesPage() {
onRetry={retry} onRetry={retry}
> >
<AdminPageHeader <AdminPageHeader
title="小程序内容:业务展示与详情" title="业务提供项"
description={`在「${offeringPageLabel(workspace.data?.templateContent ?? undefined)}」管理访客能选择的服务、产品或案例;每项内容的补充资料会显示在对应的「${detailPageLabel(workspace.data?.templateContent ?? undefined)}」。`} description={`在「${offeringPageLabel(workspace.data?.templateContent ?? undefined)}」管理访客能选择的服务、产品或案例;每项内容的补充资料会显示在对应的「${detailPageLabel(workspace.data?.templateContent ?? undefined)}」。`}
extra={ extra={
<Button type="primary" onClick={() => editor.beginOffering()}> <Button type="primary" onClick={() => editor.beginOffering()}>
@@ -57,8 +57,8 @@ export function TrustContentPage() {
onRetry={() => void Promise.all([query.refetch(), workspace.refetch()])} onRetry={() => void Promise.all([query.refetch(), workspace.refetch()])}
> >
<AdminPageHeader <AdminPageHeader
title="小程序内容:品牌介绍与信任" title="信任内容"
description={`填写真实的经历、案例、资历、流程和服务说明。这些内容会显示在${trustPlacement};保存后需发布品牌,小程序才会更新。`} description={`填写真实的经历、案例、资历、流程与服务说明,发布品牌后即会展示在${trustPlacement}。`}
extra={ extra={
<Button type="primary" onClick={() => begin()}> <Button type="primary" onClick={() => begin()}>
添加品牌内容 添加品牌内容
+15 -9
View File
@@ -171,22 +171,28 @@ body {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
justify-content: space-between; justify-content: space-between;
gap: 16px; gap: 24px;
margin-bottom: 24px; margin-bottom: 32px;
}
.admin-page-header-text {
flex: 1 1 auto;
min-width: 0;
} }
.admin-page-header-title { .admin-page-header-title {
margin: 0; margin: 0;
font-size: 24px; font-size: 20px;
font-weight: 600; font-weight: 600;
line-height: 1.35; line-height: 1.4;
color: var(--admin-text); color: var(--admin-text);
} }
.admin-page-header-description { .admin-page-header-description {
margin: 8px 0 0; margin: 6px 0 0;
font-size: 14px; max-width: 880px;
line-height: 1.5; font-size: 13px;
line-height: 1.6;
color: var(--admin-text-secondary); color: var(--admin-text-secondary);
} }
@@ -495,9 +501,9 @@ body {
.admin-brand-title { .admin-brand-title {
margin: 0; margin: 0;
font-size: 20px; font-size: 18px;
font-weight: 600; font-weight: 600;
line-height: 1.4; line-height: 1.45;
color: var(--admin-text); color: var(--admin-text);
} }