diff --git a/pages/order-list/order-list.vue b/pages/order-list/order-list.vue index 1839b20..01a3095 100644 --- a/pages/order-list/order-list.vue +++ b/pages/order-list/order-list.vue @@ -504,7 +504,8 @@ padding: 0; gap: 0; padding-top: 0; - height: 100%; + height: 100vh; + height: 100dvh; min-height: 0; overflow: hidden; } @@ -593,8 +594,10 @@ } .order-swiper { - flex: 1 1 0; - height: auto; + /* swiper 在 H5 中无法可靠地从 flex 容器继承剩余高度。 */ + flex: none; + height: calc(100vh - 108rpx); + height: calc(100dvh - 108rpx); overflow: hidden; } diff --git a/pages/package-order/package-order.vue b/pages/package-order/package-order.vue index 517a77c..6da72e6 100644 --- a/pages/package-order/package-order.vue +++ b/pages/package-order/package-order.vue @@ -728,6 +728,7 @@ gap: 18rpx; padding: 20rpx 24rpx 48rpx; height: 100vh; + height: 100dvh; min-height: 0; background: #f8f9fb; box-sizing: border-box; @@ -857,8 +858,10 @@ } .package-swiper { - flex: 1; - height: auto; + /* swiper 在 H5 中无法可靠地从嵌套 flex 获取自动高度。 */ + flex: none; + height: calc(100vh - 190rpx); + height: calc(100dvh - 190rpx); overflow: hidden; }