style(HotEvents): 优化热点事件卡片 UI 和交互体验

- 触控板滑动优化:添加 swipeToSlide 等配置,滑动更流畅
- 布局调整:涨幅标签从标题移到底部,去掉作者显示
- 重要度徽章优化:长方形圆角样式,S/A红色系、B/C橙色系

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-12-15 15:58:03 +08:00
parent c27296168d
commit 7585e6dfc0
2 changed files with 48 additions and 33 deletions

View File

@@ -121,13 +121,38 @@
display: block;
}
/* 重要度徽章 - 长方形圆角 */
.importance-badge {
position: absolute;
top: 8px;
left: 8px;
padding: 3px 10px;
border-radius: 10px;
font-size: 12px;
padding: 2px 6px;
border-radius: 4px;
font-weight: 600;
color: #fff;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
/* S级 - 深红 */
.importance-s {
background: #c0392b;
}
/* A级 - 浅红 */
.importance-a {
background: #e74c3c;
}
/* B级 - 深橙 */
.importance-b {
background: #d35400;
}
/* C级 - 浅橙 */
.importance-c {
background: #f39c12;
}
/* Card content */
@@ -144,26 +169,18 @@
word-break: break-word;
}
/* 标题文字 - inline显示可以换行 */
/* 标题文字 */
.event-title {
cursor: pointer;
}
/* 标签紧跟标题后面 */
.event-tag {
display: inline;
margin-left: 4px;
white-space: nowrap;
vertical-align: baseline;
}
/* 涨幅标签 - 底部显示 */
.event-tag .ant-tag {
font-size: 11px;
padding: 0 6px;
height: 18px;
line-height: 18px;
transform: scale(0.9);
vertical-align: middle;
font-size: 12px;
padding: 0 8px;
height: 20px;
line-height: 20px;
margin: 0;
}
/* 详情描述 - 三行省略 */
@@ -184,18 +201,12 @@
.event-footer {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
color: #8c8c8c;
margin-top: 8px;
}
.creator {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 60%;
}
/* 时间样式 - 年月日高亮 */
.time {
white-space: nowrap;