feat: 定投标记展示
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 61 KiB |
@@ -310,6 +310,7 @@ export default function MobileFundTable({
|
||||
const original = info.row.original || {};
|
||||
const code = original.code;
|
||||
const isUpdated = original.isUpdated;
|
||||
const hasDca = original.hasDca;
|
||||
const hasHoldingAmount = original.holdingAmountValue != null;
|
||||
const holdingAmountDisplay = hasHoldingAmount ? (original.holdingAmount ?? '—') : null;
|
||||
const isFavorites = favorites?.has?.(code);
|
||||
@@ -365,6 +366,7 @@ export default function MobileFundTable({
|
||||
}}
|
||||
>
|
||||
{holdingAmountDisplay}
|
||||
{hasDca && <span className="dca-indicator">定</span>}
|
||||
{isUpdated && <span className="updated-indicator">✓</span>}
|
||||
</span>
|
||||
) : code ? (
|
||||
@@ -386,6 +388,7 @@ export default function MobileFundTable({
|
||||
}}
|
||||
>
|
||||
#{code}
|
||||
{hasDca && <span className="dca-indicator">定</span>}
|
||||
{isUpdated && <span className="updated-indicator">✓</span>}
|
||||
</span>
|
||||
) : null}
|
||||
|
||||
@@ -348,6 +348,7 @@ export default function PcFundTable({
|
||||
const original = info.row.original || {};
|
||||
const code = original.code;
|
||||
const isUpdated = original.isUpdated;
|
||||
const hasDca = original.hasDca;
|
||||
const isFavorites = favorites?.has?.(code);
|
||||
const isGroupTab = currentTab && currentTab !== 'all' && currentTab !== 'fav';
|
||||
const rowContext = useContext(SortableRowContext);
|
||||
@@ -399,6 +400,7 @@ export default function PcFundTable({
|
||||
</span>
|
||||
{code ? <span className="muted code-text">
|
||||
#{code}
|
||||
{hasDca && <span className="dca-indicator">定</span>}
|
||||
{isUpdated && <span className="updated-indicator">✓</span>}
|
||||
</span> : null}
|
||||
</div>
|
||||
|
||||
@@ -1412,6 +1412,28 @@ input[type="number"] {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.dca-indicator {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 16px;
|
||||
height: 16px;
|
||||
padding: 0 4px;
|
||||
border-radius: 999px;
|
||||
background: rgba(34, 211, 238, 0.15);
|
||||
color: #22d3ee;
|
||||
font-size: 10px;
|
||||
font-weight: 500;
|
||||
margin-left: 6px;
|
||||
vertical-align: middle;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
[data-theme="light"] .dca-indicator {
|
||||
background: rgba(6, 182, 212, 0.15);
|
||||
color: #0891b2;
|
||||
}
|
||||
|
||||
.code-text {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
@@ -799,6 +799,7 @@ export default function HomePage() {
|
||||
code: f.code,
|
||||
fundName: f.name,
|
||||
isUpdated: f.jzrq === todayStr,
|
||||
hasDca: dcaPlans[f.code]?.enabled === true,
|
||||
latestNav,
|
||||
estimateNav,
|
||||
yesterdayChangePercent,
|
||||
@@ -818,7 +819,7 @@ export default function HomePage() {
|
||||
holdingProfitValue,
|
||||
};
|
||||
}),
|
||||
[displayFunds, holdings, isTradingDay, todayStr, getHoldingProfit],
|
||||
[displayFunds, holdings, isTradingDay, todayStr, getHoldingProfit, dcaPlans],
|
||||
);
|
||||
|
||||
// 自动滚动选中 Tab 到可视区域
|
||||
@@ -4160,6 +4161,7 @@ export default function HomePage() {
|
||||
</span>
|
||||
<span className="muted">
|
||||
#{f.code}
|
||||
{dcaPlans[f.code]?.enabled === true && <span className="dca-indicator">定</span>}
|
||||
{f.jzrq === todayStr && <span className="updated-indicator">✓</span>}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user