- |
-
- {stock.stock_code ? stock.stock_code.replace(/\.(SZ|SH)$/i, '') : ''}
-
- |
- {stock.stock_name || '--'} |
-
-
- {stock.sector || '未知'}
-
- |
-
- = 0.8 ? 'red' :
- stock.correlation >= 0.6 ? 'orange' : 'green'
- }
- size="sm"
- >
- {Math.round((stock.correlation || 0) * 100)}%
-
- |
-
- {stock.event_day_change_pct !== null && stock.event_day_change_pct !== undefined ? (
- = 0 ? 'red.500' : 'green.500'}
- >
- {stock.event_day_change_pct >= 0 ? '+' : ''}{stock.event_day_change_pct.toFixed(2)}%
-
- ) : (
- --
- )}
- |
-
+
+ {/* 股票卡片网格 */}
+
+ {stocks.map((stock, index) => {
+ const stockId = stock.id || index;
+ const isExpanded = expandedStocks.has(stockId);
+ const cleanCode = stock.stock_code ? stock.stock_code.replace(/\.(SZ|SH)$/i, '') : '';
+ const relationDesc = getRelationDesc(stock.relation_desc);
+ const needTruncate = relationDesc && relationDesc.length > 50;
+
+ return (
+
+
+ {/* 顶部:股票代码 + 名称 + 涨跌幅 */}
+
-
- {getRelationDesc(stock.relation_desc) ? `${getRelationDesc(stock.relation_desc)}(AI合成)` : '--'}
+
+ {cleanCode}
+
+
+ {stock.stock_name || '--'}
- |
-
- ))}
-