feat:当日净值更新则不再展示当日收益百分比

This commit is contained in:
hzm
2026-03-08 22:05:51 +08:00
parent a176e7d013
commit 6c685c61e0
2 changed files with 4 additions and 2 deletions

View File

@@ -696,6 +696,7 @@ export default function MobileFundTable({
const cls = hasProfit ? (value > 0 ? 'up' : value < 0 ? 'down' : '') : 'muted';
const amountStr = hasProfit ? (info.getValue() ?? '') : '—';
const percentStr = original.todayProfitPercent ?? '';
const isUpdated = original.isUpdated;
return (
<div style={{ width: '100%' }}>
<span className={cls} style={{ display: 'block', width: '100%', fontWeight: 700 }}>
@@ -703,7 +704,7 @@ export default function MobileFundTable({
{amountStr}
</FitText>
</span>
{percentStr ? (
{percentStr && !isUpdated ? (
<span className={`${cls} today-profit-percent`} style={{ display: 'block', width: '100%', fontSize: '0.75em', opacity: 0.9, fontWeight: 500 }}>
<FitText maxFontSize={11} minFontSize={9}>
{percentStr}

View File

@@ -657,12 +657,13 @@ export default function PcFundTable({
const cls = hasProfit ? (value > 0 ? 'up' : value < 0 ? 'down' : '') : 'muted';
const amountStr = hasProfit ? (info.getValue() ?? '') : '—';
const percentStr = original.todayProfitPercent ?? '';
const isUpdated = original.isUpdated;
return (
<div style={{ width: '100%' }}>
<FitText className={cls} style={{ fontWeight: 700, display: 'block' }} maxFontSize={14} minFontSize={10}>
{amountStr}
</FitText>
{percentStr ? (
{percentStr && !isUpdated ? (
<span className={`${cls} today-profit-percent`} style={{ display: 'block', fontSize: '0.75em', opacity: 0.9, fontWeight: 500 }}>
<FitText maxFontSize={11} minFontSize={9}>
{percentStr}