From e01092365e02d55537b20ca2a22e04865b563702 Mon Sep 17 00:00:00 2001 From: zzlgreat Date: Sun, 23 Nov 2025 13:15:41 +0800 Subject: [PATCH] update pay function --- src/views/Concept/ConceptTimelineModal.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/views/Concept/ConceptTimelineModal.js b/src/views/Concept/ConceptTimelineModal.js index 96ed35d6..37abfdb2 100644 --- a/src/views/Concept/ConceptTimelineModal.js +++ b/src/views/Concept/ConceptTimelineModal.js @@ -187,11 +187,22 @@ const ConceptTimelineModal = ({ } } + // 构建显示标题:同时显示事件和涨跌幅 + let title = ''; + if (hasEvents && item.price) { + // 同时有事件和价格数据 + title = `📰${newsCount} 📊${reportCount} ${priceInfo.text}`; + } else if (hasEvents) { + // 只有事件 + title = `📰${newsCount} 📊${reportCount}`; + } else if (item.price) { + // 只有价格数据 + title = priceInfo.text; + } + return { id: item.date, - title: hasEvents - ? `📰${newsCount} 📊${reportCount}` - : (item.price ? priceInfo.text : ''), + title, date: item.date, backgroundColor, borderColor: backgroundColor,