feat: PC端指数排序

This commit is contained in:
hzm
2026-03-15 11:34:21 +08:00
parent c24b6fb069
commit 7296706bb2
3 changed files with 95 additions and 66 deletions

View File

@@ -317,8 +317,8 @@ export default function MarketIndexAccordion({
position: 'sticky',
top: topMargin,
zIndex: 10,
width: 'calc(100% + 24px)',
marginLeft: -12,
width: isMobile ? 'calc(100% + 24px)' : '100%',
marginLeft: isMobile ? -12 : 0,
};
if (loading && indices.length === 0) {
@@ -454,7 +454,11 @@ export default function MarketIndexAccordion({
{visibleIndices.map((item, i) => (
<div
key={item.code || i}
style={{ flex: '0 0 calc((100% - 24px) / 3)' }}
style={{
flex: isMobile
? '0 0 calc((100% - 24px) / 3)'
: '0 0 calc((100% - 48px) / 5)',
}}
>
<IndexCard item={item} />
</div>