feat:隐藏持仓的时候同时隐藏颜色

This commit is contained in:
hzm
2026-03-12 23:01:39 +08:00
parent 2816a6c0dd
commit 5981440881
4 changed files with 21 additions and 10 deletions

View File

@@ -244,6 +244,7 @@ export default function GroupSummary({
<span style={{ fontSize: '16px', marginRight: 2 }}>¥</span>
{isMasked ? (
<span
className="mask-text"
style={{ fontSize: assetSize, position: 'relative', top: 4 }}
>
******
@@ -278,7 +279,9 @@ export default function GroupSummary({
}}
>
{isMasked ? (
<span style={{ fontSize: metricSize }}>******</span>
<span className="mask-text" style={{ fontSize: metricSize }}>
******
</span>
) : summary.hasAnyTodayData ? (
<>
<span style={{ marginRight: 1 }}>
@@ -331,7 +334,9 @@ export default function GroupSummary({
title="点击切换金额/百分比"
>
{isMasked ? (
<span style={{ fontSize: metricSize }}>******</span>
<span className="mask-text" style={{ fontSize: metricSize }}>
******
</span>
) : (
<>
<span style={{ marginRight: 1 }}>

View File

@@ -554,7 +554,7 @@ export default function MobileFundTable({
}
}}
>
{masked ? '******' : holdingAmountDisplay}
{masked ? <span className="mask-text">******</span> : holdingAmountDisplay}
{hasDca && <span className="dca-indicator"></span>}
{isUpdated && <span className="updated-indicator"></span>}
</span>
@@ -759,7 +759,7 @@ export default function MobileFundTable({
<div style={{ width: '100%' }}>
<span className={cls} style={{ display: 'block', width: '100%', fontWeight: 700 }}>
<FitText maxFontSize={14} minFontSize={10}>
{masked && hasProfit ? '******' : amountStr}
{masked && hasProfit ? <span className="mask-text">******</span> : amountStr}
</FitText>
</span>
{hasProfit && percentStr && !masked ? (
@@ -789,7 +789,7 @@ export default function MobileFundTable({
<div style={{ width: '100%' }}>
<span className={cls} style={{ display: 'block', width: '100%', fontWeight: 700 }}>
<FitText maxFontSize={14} minFontSize={10}>
{masked && hasProfit ? '******' : amountStr}
{masked && hasProfit ? <span className="mask-text">******</span> : amountStr}
</FitText>
</span>
{percentStr && !isUpdated && !masked ? (
@@ -818,7 +818,7 @@ export default function MobileFundTable({
<div style={{ width: '100%' }}>
<span className={cls} style={{ display: 'block', width: '100%', fontWeight: 700 }}>
<FitText maxFontSize={14} minFontSize={10}>
{masked && hasTotal ? '******' : amountStr}
{masked && hasTotal ? <span className="mask-text">******</span> : amountStr}
</FitText>
</span>
{percentStr && !masked ? (

View File

@@ -692,7 +692,7 @@ export default function PcFundTable({
return (
<div style={{ width: '100%' }}>
<FitText className={cls} style={{ fontWeight: 700, display: 'block' }} maxFontSize={14} minFontSize={10}>
{masked && hasProfit ? '******' : amountStr}
{masked && hasProfit ? <span className="mask-text">******</span> : amountStr}
</FitText>
{hasProfit && percentStr && !masked ? (
<span className={`${cls} estimate-profit-percent`} style={{ display: 'block', fontSize: '0.75em', opacity: 0.9, fontWeight: 500 }}>
@@ -750,7 +750,7 @@ export default function PcFundTable({
>
<div style={{ flex: '1 1 0', minWidth: 0 }}>
<FitText style={{ fontWeight: 700 }} maxFontSize={14} minFontSize={10}>
{masked ? '******' : (info.getValue() ?? '—')}
{masked ? <span className="mask-text">******</span> : (info.getValue() ?? '—')}
</FitText>
</div>
<button
@@ -788,7 +788,7 @@ export default function PcFundTable({
return (
<div style={{ width: '100%' }}>
<FitText className={cls} style={{ fontWeight: 700, display: 'block' }} maxFontSize={14} minFontSize={10}>
{masked && hasProfit ? '******' : amountStr}
{masked && hasProfit ? <span className="mask-text">******</span> : amountStr}
</FitText>
{percentStr && !isUpdated && !masked ? (
<span className={`${cls} today-profit-percent`} style={{ display: 'block', fontSize: '0.75em', opacity: 0.9, fontWeight: 500 }}>
@@ -820,7 +820,7 @@ export default function PcFundTable({
return (
<div style={{ width: '100%' }}>
<FitText className={cls} style={{ fontWeight: 700, display: 'block' }} maxFontSize={14} minFontSize={10}>
{masked && hasTotal ? '******' : amountStr}
{masked && hasTotal ? <span className="mask-text">******</span> : amountStr}
</FitText>
{percentStr && !masked ? (
<span className={`${cls} holding-profit-percent`} style={{ display: 'block', fontSize: '0.75em', opacity: 0.9, fontWeight: 500 }}>

View File

@@ -1025,6 +1025,12 @@ input[type="number"] {
color: var(--success);
}
.mask-text,
.up .mask-text,
.down .mask-text {
color: var(--text) !important;
}
.list {
display: grid;
grid-template-columns: repeat(2, 1fr);