🐛 修复文件列表hover时变白的问题

- 移除硬编码的mouseover/mouseout颜色
- 添加.file-list-row类使用CSS处理hover效果
- 深色/浅色主题都使用半透明紫色作为hover背景

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-30 16:30:16 +08:00
parent d3fcb159f9
commit 1503fe1d97

View File

@@ -925,6 +925,19 @@
color: var(--text-secondary); color: var(--text-secondary);
} }
/* 文件列表行样式 */
.file-list-row {
border-bottom: 1px solid var(--glass-border);
cursor: pointer;
transition: background 0.15s ease;
}
.file-list-row:hover {
background: rgba(102, 126, 234, 0.08);
}
body.light-theme .file-list-row:hover {
background: rgba(102, 126, 234, 0.06);
}
/* ========== 危险按钮 ========== */ /* ========== 危险按钮 ========== */
.btn-danger { .btn-danger {
background: linear-gradient(135deg, #ef4444, #dc2626); background: linear-gradient(135deg, #ef4444, #dc2626);
@@ -1390,14 +1403,12 @@
</thead> </thead>
<tbody> <tbody>
<tr v-for="file in files" :key="file.name" <tr v-for="file in files" :key="file.name"
style="border-bottom: 1px solid #eee; cursor: pointer;" class="file-list-row"
@click="handleFileClick(file)" @click="handleFileClick(file)"
@contextmenu.prevent="showFileContextMenu(file, $event)" @contextmenu.prevent="showFileContextMenu(file, $event)"
@touchstart="handleLongPressStart(file, $event)" @touchstart="handleLongPressStart(file, $event)"
@touchmove="handleLongPressMove($event)" @touchmove="handleLongPressMove($event)"
@touchend="handleLongPressEnd" @touchend="handleLongPressEnd">
@mouseover="$event.currentTarget.style.background='#f9f9f9'"
@mouseout="$event.currentTarget.style.background='white'">
<td style="padding: 10px;"> <td style="padding: 10px;">
<div style="display: flex; align-items: center; gap: 10px; overflow: hidden;"> <div style="display: flex; align-items: center; gap: 10px; overflow: hidden;">
<!-- 图片缩略图 --> <!-- 图片缩略图 -->