style(index-xrwu): 调整模态框样式和图片错误处理- 修改模态框的 margin 和高度相关样式

- 移除 min-height 属性,设置 max-height为 none
- 设置 overflow-y为 visible
- 调整图片加载失败时的错误处理显示内容- 删除部分冗余的 padding 和 flex 布局属性
This commit is contained in:
danial
2025-11-01 14:20:57 +08:00
parent eb81136639
commit b580046c43

View File

@@ -258,13 +258,9 @@
width: 350px;
max-width: 98%;
padding: 1.5rem 1rem;
margin: 0 auto;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
padding-top: 2rem;
padding-bottom: 2rem;
margin: 4rem auto;
max-height: none;
overflow-y: visible;
}
/* 标题字体大小调整 */
@@ -318,9 +314,9 @@
#detailsModal .modal-content {
width: 320px;
padding: 1rem;
min-height: 100vh;
padding-top: 1.5rem;
padding-bottom: 1.5rem;
margin: 3rem auto;
max-height: none;
overflow-y: visible;
}
#detailsModal h2 {
@@ -339,7 +335,9 @@
#detailsModal .modal-content {
width: 300px;
padding: 0.75rem;
min-height: 100vh;
margin: 2.5rem auto;
max-height: none;
overflow-y: visible;
}
#detailsModal h2 {
@@ -429,7 +427,7 @@
<img src="../static/img/xrwu/{{.mmValue}}.jpg"
alt="购买指南示例图"
class="w-full h-auto object-contain"
onerror="this.style.display='none'; this.parentElement.innerHTML='<div class=\\'flex flex-col items-center justify-center h-full text-center p-8 min-h-[280px]\\'><svg class=\\'w-16 h-16 mx-auto text-gray-400 mb-2\\' fill=\\'none\\' stroke=\\'currentColor\\' viewBox=\\'0 0 24 24\\' xmlns=\\'http://www.w3.org/2000/svg\\'><path stroke-linecap=\\'round\\' stroke-linejoin=\\'round\\' stroke-width=\\'2\\' d=\\'M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\\'></path></svg><p class=\\'text-sm text-gray-500\\'>购买示例图片</p></div>';">
onerror="this.style.display='none'; this.parentElement.innerHTML='<div class=\\'flex flex-col items-center justify-center h-full text-center p-8\\'><svg class=\\'w-16 h-16 mx-auto text-gray-400 mb-2\\' fill=\\'none\\' stroke=\\'currentColor\\' viewBox=\\'0 0 24 24\\' xmlns=\\'http://www.w3.org/2000/svg\\'><path stroke-linecap=\\'round\\' stroke-linejoin=\\'round\\' stroke-width=\\'2\\' d=\\'M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\\'></path></svg><p class=\\'text-sm text-gray-500\\'>购买示例图片</p></div>';">
</div>
</div>