Files
hms/apps/miniprogram/src/components/patterns/PageHeader/index.scss
iven d758563a13 feat(mp): 小程序统一组件库 Phase 1 — Token 扩展 + 10 组件 + useListPage Hook
三层架构组件库:
- 第 1 层原子组件:PageShell/ContentCard/StatusTag/SectionTitle/LoadingCard
- 第 2 层组合模式:PageHeader/SearchSection/CardList/PaginationBar
- 第 3 层 Hook:useListPage(列表页通用逻辑抽象)

Token 扩展:新增 --tk-card-*/--tk-gap-*/--tk-page-* 等结构化 CSS 变量,
关怀模式通过变量覆写自动生效,新组件零额外代码即获关怀支持。

设计规格:docs/superpowers/specs/2026-05-16-miniprogram-unified-components-design.md
2026-05-16 00:47:39 +08:00

56 lines
891 B
SCSS

@import '../../styles/variables';
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
height: var(--tk-touch-min);
padding: 0 var(--tk-page-padding);
background: $bg;
z-index: 10;
&--sticky {
position: sticky;
top: 0;
}
&__left {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
flex: 1;
}
&__back {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
min-height: var(--tk-touch-min);
}
&__back-icon {
font-size: 24px;
color: $tx;
line-height: 1;
}
&__title {
font-size: var(--tk-font-h1);
font-weight: 600;
color: $tx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&__right {
display: flex;
align-items: center;
gap: 12px;
flex-shrink: 0;
}
}