From fcb9eeac98c7d240cab2934e7546abb7c9f2ad06 Mon Sep 17 00:00:00 2001 From: zhaowenkang Date: Thu, 23 Oct 2025 21:17:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E8=AE=A1=E7=AE=97=E9=81=AE?= =?UTF-8?q?=E6=8C=A1=E5=92=8C=E5=9C=B0=E5=9B=BE=E5=B0=BA=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/marketSituation.vue | 83 +++++++++++++++++++++++++++++++++--------- 1 file changed, 66 insertions(+), 17 deletions(-) diff --git a/pages/home/marketSituation.vue b/pages/home/marketSituation.vue index d512ae3..170a481 100644 --- a/pages/home/marketSituation.vue +++ b/pages/home/marketSituation.vue @@ -39,10 +39,10 @@ - + - + @@ -99,7 +99,7 @@ @@ -551,9 +574,7 @@ onMounted(() => { } .map { - flex: 1; width: calc(100% - 60rpx); - min-height: 450rpx; margin: 0 30rpx; display: flex; align-items: center; @@ -561,12 +582,40 @@ onMounted(() => { background-color: #F3F3F3; border-radius: 30rpx; border: 1rpx solid #E0E0E0; + padding: 30rpx 20rpx; + box-sizing: border-box; + /* 设置最小高度保护,但允许内容撑开 */ + min-height: 200rpx; } .map image { - width: 90%; - height: 400rpx; - object-fit: contain; + width: 100%; + height: auto; + max-width: 100%; + display: block; + /* widthFix模式下,高度会自动按比例调整 */ + /* 设置最大高度避免图片过大 */ + max-height: 60vh; + /* 添加平滑过渡效果 */ + transition: all 0.3s ease; + max-height: 60vh; +} + +/* 响应式优化 */ +@media screen and (max-width: 750rpx) { + .map { + margin: 0 20rpx; + width: calc(100% - 40rpx); + padding: 20rpx 15rpx; + } +} + +@media screen and (max-width: 480rpx) { + .map { + margin: 0 15rpx; + width: calc(100% - 30rpx); + padding: 15rpx 10rpx; + } } .static-footer {