Explorar el Código

ios不显示购物车问题

sunshibo hace 1 mes
padre
commit
5c53d19add
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      pages/orderFood/components/CartModal.vue

+ 4 - 1
pages/orderFood/components/CartModal.vue

@@ -163,6 +163,7 @@ const handleClear = () => {
 <style scoped lang="scss">
 .cart-modal {
     width: 100%;
+    height: 70vh;
     max-height: 70vh;
     background: #FFFFFF;
     border-radius: 24rpx 24rpx 0 0;
@@ -212,10 +213,12 @@ const handleClear = () => {
     &__list {
         flex: 1;
         min-height: 0;
-        height: 0;
+        /* iOS:不设 height:0,避免 flex 子项在 iOS WebView 中被算成 0 导致列表不显示;用 min-height 兜底 */
+        min-height: 300rpx;
         padding: 24rpx 30rpx;
         padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
         box-sizing: border-box;
+        -webkit-overflow-scrolling: touch;
     }
 }