Commit 3be81e1b authored by weishengfei's avatar weishengfei

fix(postnatalCheckUp): 修复产检首页布局适配问题

- 轮播图区域增加 v-if 条件,避免空数组导致的渲染问题
- 顶部信息区域调整为 flex 布局,优化高度适配
- 记录列表区域使用 flex 布局替代固定高度,解决内容溢出问题
- 统一使用 flex-shrink: 0 以保持元素比例
parent 33304d5b
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</customize-navigation> </customize-navigation>
<view class="postnatal-con"> <view class="postnatal-con">
<!-- 轮播图 --> <!-- 轮播图 -->
<swiper class="banner-swiper" :autoplay="true" :circular="true"> <swiper class="banner-swiper" :autoplay="true" :circular="true" v-if="bannerList.length > 0 ">
<swiper-item v-for="(item, index) in bannerList" :key="index"> <swiper-item v-for="(item, index) in bannerList" :key="index">
<image class="banner-img" :src="`${item.img}`" mode="aspectFill" <image class="banner-img" :src="`${item.img}`" mode="aspectFill"
@click="handleBannerClick(item, index)" /> @click="handleBannerClick(item, index)" />
...@@ -457,6 +457,9 @@ onShow(() => { ...@@ -457,6 +457,9 @@ onShow(() => {
// width: 750rpx; // width: 750rpx;
top: 190rpx; top: 190rpx;
left: 31rpx; left: 31rpx;
display: flex;
flex-direction: column;
height: calc(100vh - 200rpx);
&-info { &-info {
font-size: 24rpx; font-size: 24rpx;
...@@ -464,7 +467,8 @@ onShow(() => { ...@@ -464,7 +467,8 @@ onShow(() => {
align-items: center; align-items: center;
margin-top: 50rpx; margin-top: 50rpx;
font-weight: 500; font-weight: 500;
flex-shrink: 0;
height: 32rpx;
.info-c { .info-c {
width: 2rpx; width: 2rpx;
height: 22rpx; height: 22rpx;
...@@ -479,11 +483,12 @@ onShow(() => { ...@@ -479,11 +483,12 @@ onShow(() => {
} }
&-btn { &-btn {
height: 86rpx;
margin-top: 55rpx; margin-top: 55rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 30rpx; margin-bottom: 30rpx;
flex-shrink: 0;
.btn-item { .btn-item {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -512,7 +517,9 @@ onShow(() => { ...@@ -512,7 +517,9 @@ onShow(() => {
} }
&-record { &-record {
height: calc(100vh - 650rpx); flex: 1;
// height: calc(100vh - 650rpx);
overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
.record-item { .record-item {
...@@ -707,6 +714,7 @@ onShow(() => { ...@@ -707,6 +714,7 @@ onShow(() => {
} }
.banner-swiper { .banner-swiper {
flex-shrink: 0;
width: 687rpx; width: 687rpx;
height: 177rpx; height: 177rpx;
border-radius: 12rpx; border-radius: 12rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment