feat: 产品详情页竖屏适配

This commit is contained in:
2025-11-01 16:26:16 +08:00
parent fc164beaf3
commit 52048fc2a6
2 changed files with 33 additions and 2 deletions

View File

@ -10,7 +10,7 @@
<el-carousel
v-else
class="product-carousel"
height="500px"
height="auto"
:autoplay="false"
:loop="false"
arrow="always"
@ -18,8 +18,9 @@
<el-carousel-item
v-for="(item, index) in product.images || []"
:key="index"
class="product-carousel-item"
>
<div class="product-carousel-item">
<div>
<el-image
:src="getImageUrl(item.image || '')"
:alt="product.name"
@ -59,6 +60,10 @@
gap: 3rem;
}
.product-carousel-item {
height: 500px;
}
.product-image .el-image {
position: relative;
width: 100%;
@ -99,4 +104,23 @@
line-height: 1.6;
margin-bottom: 2rem;
}
@media (max-width: 768px) {
.product-header {
grid-template-columns: 1fr;
}
.product-carousel-item {
height: 300px;
}
.product-image .el-image {
height: 300px;
}
.product-info h1 {
font-size: 1.5rem;
margin-top: 0;
}
}
</style>