feat: 增强图像查看器功能并添加“全部下载”按钮在imageViewerModal中添加了全屏查看、左右翻页和删除图像功能。在index.html中新增了downloadAllImagesBtn按钮,用于一键下载所有生成的图像。script.js中相应实现了这些新功能的逻辑。

This commit is contained in:
2025-08-29 13:51:49 +08:00
parent 8cfa2a8ac9
commit db6d9efd95
3 changed files with 384 additions and 49 deletions

View File

@@ -404,7 +404,8 @@ body {
/* 图像查看模态框样式 */
#viewerModalImage {
max-height: 80vh;
max-height: 85vh;
max-width: 95vw;
object-fit: contain;
border-radius: 8px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
@@ -412,7 +413,63 @@ body {
}
#viewerModalImage:hover {
transform: scale(1.02);
//transform: scale(1.02);
}
/* 全屏模态框样式 */
.modal-fullscreen .modal-dialog {
max-width: 100%;
margin: 0;
height: 100vh;
}
.modal-fullscreen .modal-content {
height: 100%;
border: none;
border-radius: 0;
}
.modal-fullscreen .modal-body {
height: calc(100% - 120px);
display: flex;
align-items: center;
justify-content: center;
background-color: #000;
}
/* 翻页按钮样式 */
#prevImageBtn, #nextImageBtn {
width: 50px;
height: 50px;
border-radius: 50%;
opacity: 0.7;
transition: opacity 0.3s ease;
z-index: 10;
}
#prevImageBtn:hover, #nextImageBtn:hover {
opacity: 1;
}
#prevImageBtn {
left: 20px;
}
#nextImageBtn {
right: 20px;
}
/* 暗色背景下的按钮样式 */
.modal-fullscreen .modal-body .btn-light {
background-color: rgba(255, 255, 255, 0.2);
border-color: rgba(255, 255, 255, 0.3);
color: white;
}
.modal-fullscreen .modal-body .btn-light:hover {
background-color: rgba(255, 255, 255, 0.3);
border-color: rgba(255, 255, 255, 0.5);
color: white;
}
/* 图像查看模态框特定样式 */