From ed9f7ddabe60a026de49fb9a8b14dc837de65dd9 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Thu, 15 Jan 2026 16:31:39 +0800 Subject: [PATCH] =?UTF-8?q?style(EventCard):=20=E4=BA=8B=E4=BB=B6=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E5=B8=83=E5=B1=80=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 投票按钮移至标题行右侧,红绿胶囊合并样式 - 浏览量图标换为 lucide Eye icon - 浏览/收藏绝对定位到卡片右下角 - 收藏按钮改为深色胶囊背景+金色星星 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../HorizontalDynamicNewsEventCard.js | 237 ++++++++++-------- .../EventCard/atoms/EventFollowButton.js | 10 +- 2 files changed, 132 insertions(+), 115 deletions(-) diff --git a/src/views/Community/components/EventCard/HorizontalDynamicNewsEventCard.js b/src/views/Community/components/EventCard/HorizontalDynamicNewsEventCard.js index 62ebe531..0174f4a2 100644 --- a/src/views/Community/components/EventCard/HorizontalDynamicNewsEventCard.js +++ b/src/views/Community/components/EventCard/HorizontalDynamicNewsEventCard.js @@ -25,7 +25,7 @@ import { } from './atoms'; import StockChangeIndicators from '@components/StockChangeIndicators'; import { GLASS_BLUR } from '@/constants/glassConfig'; -import { TrendingUp, TrendingDown } from 'lucide-react'; +import { TrendingUp, TrendingDown, Eye } from 'lucide-react'; // 数字格式化(8600 → 8.6k) const formatCompactNumber = (num) => { @@ -206,127 +206,142 @@ const HorizontalDynamicNewsEventCard = React.memo(({ - {/* 第一行:概念标签 + 标题(内联布局) */} - - onTitleClick?.(e, event)} - mt={1} - paddingLeft={isMobile ? '70px' : undefined} - lineHeight="1.6" - css={{ - display: '-webkit-box', - WebkitLineClamp: 2, - WebkitBoxOrient: 'vertical', - overflow: 'hidden', - }} + {/* 第一行:概念标签 + 标题 + 投票按钮 */} + + {/* 左侧:概念 + 标题 */} + - {/* 概念标签(内联) */} - {conceptLabel && ( - - {conceptLabel} - - )} - {/* 标题(内联) */} - onTitleClick?.(e, event)} + mt={1} + paddingLeft={isMobile ? '70px' : undefined} + lineHeight="1.6" + css={{ + display: '-webkit-box', + WebkitLineClamp: 2, + WebkitBoxOrient: 'vertical', + overflow: 'hidden', + }} > - {event.title} - - - + {/* 概念标签(内联) */} + {conceptLabel && ( + + {conceptLabel} + + )} + {/* 标题(内联) */} + + {event.title} + + + - {/* 底部:左侧涨跌幅 + 右侧工具栏 */} - - {/* 左侧:涨跌幅指标(保持默认样式) */} + {/* 右侧:投票按钮(紧密相连的圆角矩形) */} + e.stopPropagation()}> + {/* 看涨 - 左半边 */} + + onVoteChange?.({ eventId: event.id, voteType: 'bullish' })} + > + + + {formatCompactNumber(event.bullish_count)} + + 看涨 + + + + {/* 看跌 - 右半边 */} + + onVoteChange?.({ eventId: event.id, voteType: 'bearish' })} + > + + + {formatCompactNumber(event.bearish_count)} + + 看跌 + + + + + + {/* 第二行:涨跌幅指标 */} + + - {/* 右侧:工具栏 */} - e.stopPropagation()}> - {/* 浏览量 - 上下结构 */} - - 👁 - {formatCompactNumber(event.view_count)} - - - {/* 收藏按钮 - 上下结构 */} - onToggleFollow?.(event.id)} - size="sm" - showCount={true} - variant="minimal" - layout="vertical" - /> - - {/* 合并投票按钮 - 左红右绿,上图标下文字 */} - - {/* 看涨 - 红色左半边 */} - - onVoteChange?.({ eventId: event.id, voteType: 'bullish' })} - > - - {formatCompactNumber(event.bullish_count)} - - - - {/* 看跌 - 绿色右半边 */} - - onVoteChange?.({ eventId: event.id, voteType: 'bearish' })} - > - - {formatCompactNumber(event.bearish_count)} - - - + {/* 右下角:浏览 + 收藏(绝对定位) */} + e.stopPropagation()} + > + {/* 浏览量 */} + + + {formatCompactNumber(event.view_count)} + + {/* 收藏按钮 */} + onToggleFollow?.(event.id)} + size="sm" + showCount={true} + variant="minimal" + layout="horizontal" + /> diff --git a/src/views/Community/components/EventCard/atoms/EventFollowButton.js b/src/views/Community/components/EventCard/atoms/EventFollowButton.js index e9410906..07c302a8 100644 --- a/src/views/Community/components/EventCard/atoms/EventFollowButton.js +++ b/src/views/Community/components/EventCard/atoms/EventFollowButton.js @@ -39,18 +39,20 @@ const EventFollowButton = ({ @@ -58,7 +60,7 @@ const EventFollowButton = ({ {followerCount || 0}