优化 PC 首页点击式筛选与排序体验

默认区平铺常用条件并支持刀皮/红皮/枪皮多选,高级筛选折叠展示;修复综合推荐无法选中、筛选排序导致页面回顶等问题。
This commit is contained in:
yml2213
2026-07-18 20:59:21 +08:00
parent 1a4776bba0
commit ed4d3f011c
8 changed files with 667 additions and 230 deletions
+149 -7
View File
@@ -1,41 +1,183 @@
/* 筛选器相关样式 */
.horizontal-filter-card {
padding: 24px;
padding: 20px 22px 16px;
border: 1px solid #eef1f5;
border-radius: 16px;
background: #ffffff;
box-shadow: 0 4px 12px rgba(23, 35, 61, 0.03);
}
.quick-filter-card {
padding-bottom: 12px;
}
.filter-header {
display: flex;
gap: 16px;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
margin-bottom: 14px;
}
.filter-title {
display: flex;
align-items: center;
gap: 12px;
gap: 10px;
}
.filter-title-bar {
display: inline-block;
flex: 0 0 auto;
width: 4px;
height: 16px;
border-radius: 999px;
background: #ff6a00 !important;
box-shadow: 0 0 0 1px rgba(255, 106, 0, 0.12);
}
.filter-title strong {
font-size: 18px;
font-size: 15px;
font-weight: 800;
color: #17233d;
}
.filter-title span {
padding: 4px 10px;
border-radius: 6px;
padding: 2px 8px;
border-radius: 999px;
background: #f1f5f9;
font-size: 13px;
font-size: 12px;
font-weight: 700;
color: #64748b;
}
/* PC 点击式快速筛选 */
.quick-filter-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px 28px;
}
.filter-field {
display: grid;
grid-template-columns: 64px minmax(0, 1fr);
gap: 10px;
align-items: start;
}
.filter-field-full {
grid-column: 1 / -1;
}
.filter-field label {
padding-top: 6px;
font-size: 13px;
font-weight: 700;
color: #334155;
line-height: 1.3;
white-space: nowrap;
}
.pill-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
min-height: 28px;
align-items: center;
}
.pill-chip {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 28px;
padding: 4px 12px;
border: none;
border-radius: 999px;
background: #f3f5f9;
color: #475569;
font-size: 12px;
font-weight: 600;
line-height: 1.2;
cursor: pointer;
transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.pill-chip:hover {
background: #e8edf5;
color: #1e293b;
}
.pill-chip.active {
background: #fff1e6;
color: #ff6a00;
box-shadow: inset 0 0 0 1px #ffd0a8;
}
.pill-empty {
font-size: 12px;
color: #94a3b8;
}
.advanced-toggle-row {
display: flex;
justify-content: center;
margin-top: 14px;
padding-top: 4px;
}
.advanced-toggle {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
border: none;
background: transparent;
color: #64748b;
font-size: 13px;
font-weight: 600;
cursor: pointer;
}
.advanced-toggle:hover {
color: #ff6a00;
}
.advanced-toggle em {
min-width: 18px;
height: 18px;
padding: 0 5px;
border-radius: 999px;
background: #ff6a00;
color: #fff;
font-size: 11px;
font-style: normal;
font-weight: 700;
line-height: 18px;
text-align: center;
}
.advanced-caret {
display: inline-block;
transition: transform 0.15s;
font-size: 12px;
}
.advanced-caret.open {
transform: rotate(180deg);
}
.advanced-filter-panel {
margin-top: 12px;
padding-top: 14px;
border-top: 1px dashed #e5eaf1;
}
@media (max-width: 960px) {
.quick-filter-grid {
grid-template-columns: 1fr;
}
}
.filter-chip-row {
display: flex;
flex-wrap: wrap;