为所有作品添加鼠标悬停做同款按钮 - 在右下角显示,支持所有作品页面
This commit is contained in:
@@ -63,6 +63,13 @@
|
|||||||
<div class="work-overlay">
|
<div class="work-overlay">
|
||||||
<div class="overlay-text">{{ work.text }}</div>
|
<div class="overlay-text">{{ work.text }}</div>
|
||||||
</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>
|
||||||
<div class="work-info">
|
<div class="work-info">
|
||||||
<div class="work-title">{{ work.title }}</div>
|
<div class="work-title">{{ work.title }}</div>
|
||||||
@@ -452,6 +459,34 @@ onMounted(() => {
|
|||||||
object-fit: cover;
|
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 {
|
.work-overlay {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|||||||
@@ -73,6 +73,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 鼠标悬停时显示的做同款按钮 -->
|
||||||
|
<div class="hover-create-btn" @click.stop="createSimilar(item)">
|
||||||
|
<el-button type="primary" size="small" round>
|
||||||
|
<el-icon><VideoPlay /></el-icon>
|
||||||
|
做同款
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<div class="title" :title="item.title">{{ item.title }}</div>
|
<div class="title" :title="item.title">{{ item.title }}</div>
|
||||||
@@ -370,8 +377,20 @@ const handleClose = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 创建同款
|
// 创建同款
|
||||||
const createSimilar = () => {
|
const createSimilar = (item) => {
|
||||||
ElMessage.info('跳转到创作页面')
|
if (item) {
|
||||||
|
ElMessage.info(`基于作品"${item.title}"创建同款`)
|
||||||
|
// 根据作品类型跳转到相应的创建页面
|
||||||
|
if (item.type === 'video') {
|
||||||
|
router.push('/text-to-video/create')
|
||||||
|
} else if (item.type === 'image') {
|
||||||
|
router.push('/image-to-video/create')
|
||||||
|
} else {
|
||||||
|
router.push('/text-to-video/create')
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ElMessage.info('跳转到创作页面')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const download = (item) => {
|
const download = (item) => {
|
||||||
@@ -486,6 +505,34 @@ onMounted(() => {
|
|||||||
.checker { position: absolute; left: 6px; top: 6px; }
|
.checker { position: absolute; left: 6px; top: 6px; }
|
||||||
.actions { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s ease; }
|
.actions { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s ease; }
|
||||||
.thumb:hover .actions { opacity: 1; }
|
.thumb:hover .actions { opacity: 1; }
|
||||||
|
|
||||||
|
/* 鼠标悬停时显示的做同款按钮 */
|
||||||
|
.hover-create-btn {
|
||||||
|
position: absolute;
|
||||||
|
right: 6px;
|
||||||
|
bottom: 6px;
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(10px);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumb: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-card.selected .thumb::after {
|
.work-card.selected .thumb::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -63,6 +63,13 @@
|
|||||||
<div class="work-overlay">
|
<div class="work-overlay">
|
||||||
<div class="overlay-text">{{ work.text }}</div>
|
<div class="overlay-text">{{ work.text }}</div>
|
||||||
</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>
|
||||||
<div class="work-info">
|
<div class="work-info">
|
||||||
<div class="work-title">{{ work.title }}</div>
|
<div class="work-title">{{ work.title }}</div>
|
||||||
@@ -452,6 +459,34 @@ onMounted(() => {
|
|||||||
object-fit: cover;
|
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 {
|
.work-overlay {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|||||||
@@ -63,6 +63,13 @@
|
|||||||
<div class="work-overlay">
|
<div class="work-overlay">
|
||||||
<div class="overlay-text">{{ work.text }}</div>
|
<div class="overlay-text">{{ work.text }}</div>
|
||||||
</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>
|
||||||
<div class="work-info">
|
<div class="work-info">
|
||||||
<div class="work-title">{{ work.title }}</div>
|
<div class="work-title">{{ work.title }}</div>
|
||||||
@@ -453,6 +460,34 @@ onMounted(() => {
|
|||||||
object-fit: cover;
|
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 {
|
.work-overlay {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user