为所有作品添加鼠标悬停做同款按钮 - 在右下角显示,支持所有作品页面

This commit is contained in:
AIGC Developer
2025-10-21 18:08:26 +08:00
parent bd4d0e03dc
commit 94a34ad7dc
4 changed files with 154 additions and 2 deletions

View File

@@ -63,6 +63,13 @@
<div class="work-overlay">
<div class="overlay-text">{{ work.text }}</div>
</div>
<!-- 鼠标悬停时显示的做同款按钮 -->
<div class="hover-create-btn" @click.stop="goToCreate(work)">
<el-button type="primary" size="small" round>
<el-icon><VideoPlay /></el-icon>
做同款
</el-button>
</div>
</div>
<div class="work-info">
<div class="work-title">{{ work.title }}</div>
@@ -453,6 +460,34 @@ onMounted(() => {
object-fit: cover;
}
/* 鼠标悬停时显示的做同款按钮 */
.hover-create-btn {
position: absolute;
right: 8px;
bottom: 8px;
opacity: 0;
transform: translateY(10px);
transition: all 0.3s ease;
z-index: 10;
}
.work-thumbnail:hover .hover-create-btn {
opacity: 1;
transform: translateY(0);
}
.hover-create-btn .el-button {
background: rgba(64, 158, 255, 0.9);
border: none;
backdrop-filter: blur(8px);
box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}
.hover-create-btn .el-button:hover {
background: rgba(64, 158, 255, 1);
transform: scale(1.05);
}
.work-overlay {
position: absolute;
bottom: 0;