fix: 个股中心bug修复

This commit is contained in:
zdl
2025-12-10 13:29:08 +08:00
parent 1adbeda168
commit 7c00763999
2 changed files with 14 additions and 6 deletions

View File

@@ -544,11 +544,19 @@ const InvestmentCalendar = () => {
render: (concepts) => ( render: (concepts) => (
<Space wrap> <Space wrap>
{concepts && concepts.length > 0 ? ( {concepts && concepts.length > 0 ? (
concepts.slice(0, 3).map((concept, index) => ( concepts.slice(0, 3).map((concept, index) => {
<Tag key={index} icon={<TagsOutlined />}> // 兼容多种数据格式:字符串、数组、对象
{Array.isArray(concept) ? concept[0] : concept} const conceptName = typeof concept === 'string'
</Tag> ? concept
)) : Array.isArray(concept)
? concept[0]
: concept?.concept || concept?.name || '';
return (
<Tag key={index} icon={<TagsOutlined />}>
{conceptName}
</Tag>
);
})
) : ( ) : (
<Text type="secondary"></Text> <Text type="secondary"></Text>
)} )}

View File

@@ -2426,7 +2426,7 @@ const CompanyAnalysisComplete = ({ stockCode: propStockCode }) => {
<> <>
{event.keywords.slice(0, 4).map((keyword, kidx) => ( {event.keywords.slice(0, 4).map((keyword, kidx) => (
<Tag key={kidx} size="sm" colorScheme="cyan" variant="subtle"> <Tag key={kidx} size="sm" colorScheme="cyan" variant="subtle">
{keyword} {typeof keyword === 'string' ? keyword : keyword.concept}
</Tag> </Tag>
))} ))}
</> </>