feat: 关联板块字体大小调整

This commit is contained in:
hzm
2026-03-17 20:01:49 +08:00
parent fb0dc25341
commit 12229e8eeb
2 changed files with 12 additions and 3 deletions

View File

@@ -715,7 +715,12 @@ export default function MobileFundTable({
const original = info.row.original || {};
const code = original.code;
const value = (code && (relatedSectorByCode?.[code] ?? relatedSectorCacheRef.current.get(code))) || '';
return value || '—';
const display = value || '—';
return (
<div style={{ width: '100%', textAlign: value ? 'left' : 'right', fontSize: '12px' }}>
{display}
</div>
);
},
meta: { align: 'left', cellClassName: 'related-sector-cell', width: columnWidthMap.relatedSector ?? 120 },
},

View File

@@ -627,7 +627,12 @@ export default function PcFundTable({
const original = info.row.original || {};
const code = original.code;
const value = (code && (relatedSectorByCode?.[code] ?? relatedSectorCacheRef.current.get(code))) || '';
return value || '—';
const display = value || '—';
return (
<div style={{ width: '100%', textAlign: value ? 'left' : 'right', fontSize: '14px' }}>
{display}
</div>
);
},
meta: {
align: 'right',
@@ -1196,7 +1201,6 @@ export default function PcFundTable({
const columnId = cell.column.id || cell.column.columnDef?.accessorKey;
const isNameColumn = columnId === 'fundName';
const rightAlignedColumns = new Set([
'relatedSector',
'latestNav',
'estimateNav',
'yesterdayChangePercent',