fix: 移动端表头吸附改进

This commit is contained in:
hzm
2026-03-08 12:35:06 +08:00
parent 6d2cf60d21
commit a3719c58fb
2 changed files with 8 additions and 10 deletions

View File

@@ -263,9 +263,9 @@ export default function MobileFundTable({
group.mobileShowFullFundName = show;
parsed[groupKey] = group;
window.localStorage.setItem('customSettings', JSON.stringify(parsed));
setConfigByGroup((prev) => ({
...prev,
[groupKey]: { ...prev[groupKey], mobileShowFullFundName: show }
setConfigByGroup((prev) => ({
...prev,
[groupKey]: { ...prev[groupKey], mobileShowFullFundName: show }
}));
onCustomSettingsChange?.();
} catch {}
@@ -338,11 +338,9 @@ export default function MobileFundTable({
const handlePortalScroll = () => syncScrollToTable();
tableEl.addEventListener('scroll', handleTableScroll, { passive: true });
portalEl.addEventListener('scroll', handlePortalScroll, { passive: true });
return () => {
tableEl.removeEventListener('scroll', handleTableScroll);
portalEl.removeEventListener('scroll', handlePortalScroll);
};
}, [showPortalHeader]);
@@ -430,8 +428,8 @@ export default function MobileFundTable({
</button>
)}
<div className="title-text">
<span
className={`name-text ${showFullFundName ? 'show-full' : ''}`}
<span
className={`name-text ${showFullFundName ? 'show-full' : ''}`}
title={isUpdated ? '今日净值已更新' : ''}
>
{info.getValue() ?? '—'}