feat:更新图标位置调整

This commit is contained in:
hzm
2026-02-27 22:30:49 +08:00
parent c3157439c3
commit 1c2195dd64
3 changed files with 17 additions and 9 deletions

View File

@@ -249,12 +249,15 @@ export default function PcFundTable({
)} )}
<div className="title-text"> <div className="title-text">
<span <span
className={`name-text ${isUpdated ? 'updated' : ''}`} className={`name-text`}
title={isUpdated ? '今日净值已更新' : ''} title={isUpdated ? '今日净值已更新' : ''}
> >
{info.getValue() ?? '—'} {info.getValue() ?? '—'}
</span> </span>
{code ? <span className="muted code-text">#{code}</span> : null} {code ? <span className="muted code-text">
#{code}
{isUpdated && <span className="updated-indicator"></span>}
</span> : null}
</div> </div>
</div> </div>
); );

View File

@@ -958,8 +958,7 @@ input[type="number"] {
line-height: 1.4; line-height: 1.4;
} }
.name-text.updated::after { .updated-indicator {
content: "✓";
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

View File

@@ -3944,17 +3944,20 @@ export default function HomePage() {
)} )}
<div className="title-text"> <div className="title-text">
<span <span
className={`name-text ${f.jzrq === todayStr ? 'updated' : ''}`} className="name-text"
title={f.jzrq === todayStr ? "今日净值已更新" : ""}
> >
{f.name} {f.name}
</span> </span>
<span className="muted code-text"> <span
className="muted code-text"
title={f.jzrq === todayStr ? "今日净值已更新" : ""}
>
{(() => { {(() => {
const holding = holdings[f.code]; const holding = holdings[f.code];
const profit = getHoldingProfit(f, holding); const profit = getHoldingProfit(f, holding);
return profit ? `¥${profit.amount.toFixed(2)}` : `#${f.code}`; return profit ? `¥${profit.amount.toFixed(2)}` : `#${f.code}`;
})()} })()}
{f.jzrq === todayStr && <span className="updated-indicator"></span>}
</span> </span>
</div> </div>
</div> </div>
@@ -4134,12 +4137,15 @@ export default function HomePage() {
)} )}
<div className="title-text"> <div className="title-text">
<span <span
className={`name-text ${f.jzrq === todayStr ? 'updated' : ''}`} className={`name-text`}
title={f.jzrq === todayStr ? "今日净值已更新" : ""} title={f.jzrq === todayStr ? "今日净值已更新" : ""}
> >
{f.name} {f.name}
</span> </span>
<span className="muted">#{f.code}</span> <span className="muted">
#{f.code}
{f.jzrq === todayStr && <span className="updated-indicator"></span>}
</span>
</div> </div>
</div> </div>