Files
fitness-coach/miniprogram/pages/category/category.wxss
wm b687c50e3d fix(category): 分类横列吸顶固定 + 默认高亮「全部」+ 加载态常驻
1) 滚动时顶部分类横列不被隐藏
   - filterbar 改 position:sticky,top 用 calc(statusBarHeight px + 88rpx) 精确贴在 navbar 下方,
     不同机型状态栏高度差异下不串位;加背景色(var(--bg-grad))避免滚动时内容透出
2) 修复「加载有问题」的感知问题
   - 进入分类页(如首页分类 tab)时 activeValue 为空且 values 无空值项,导致所有 chip 都不高亮;
     现头部插入「全部」项(value:'')并默认选中,进入即明确当前为全部动作
   - filterbar 原 wx:if values.length 在加载期间整块消失;现加载/空态常驻占位(显示『加载分类中…』/『暂无分类』)
2026-07-23 19:54:22 +08:00

22 lines
874 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.page { min-height: 100vh; background: var(--bg-grad); }
/* 分类横列吸顶top = 状态栏高度 + 导航栏 88rpx精确贴在 navbar 下方,不同机型不串位 */
.filterbar {
position: sticky;
z-index: 40;
white-space: nowrap;
padding: 8rpx 0 4rpx;
background: var(--bg-grad);
}
.filterbar chip { display: inline-block; margin-right: 16rpx; }
.filterbar__spacer { display: inline-block; width: 4rpx; }
/* 加载 / 空态占位:横列区域常驻,避免加载期间整块消失 */
.filterbar__loading {
font-size: 24rpx;
padding: 22rpx 4rpx 14rpx;
background: var(--bg-grad);
}
.count { font-size: 24rpx; margin: 20rpx 0 8rpx; }
.grid { display: flex; flex-wrap: wrap; gap: 18rpx; margin-top: 12rpx; }
.grid__item { width: calc((100% - 18rpx) / 2); }
.empty { color: var(--text-3); font-size: 26rpx; text-align: center; padding: 80rpx 0; }