瀏覽代碼

bug fix: 之前的bug fix:商品详情界面高度有时会溢出视口 在ios中无效

任一存 1 年之前
父節點
當前提交
fc5fdf7551
共有 1 個文件被更改,包括 9 次插入5 次删除
  1. 9 5
      src/components/Tags/goods-list.vue

+ 9 - 5
src/components/Tags/goods-list.vue

@@ -314,16 +314,20 @@ onMounted(() => {
           background: #fff;
           background: #fff;
           padding-bottom: 14px;
           padding-bottom: 14px;
           height: 95%;
           height: 95%;
-          display: flex;
-          flex-direction: column;
+          // 用flex布局实现中间部分可scroll的方案在ios中不生效
+          // display: flex;
+          // flex-direction: column;
           >.imgcon{
           >.imgcon{
-            flex: 0;
+            // flex: 0;
+            height: 34vh;
           }
           }
           .info {
           .info {
             font-size: 14px;
             font-size: 14px;
             color: #131d34;
             color: #131d34;
             padding: 16px 20px;
             padding: 16px 20px;
-            flex: 0 1 auto;
+            // flex: 0 1 auto;
+            max-height: calc(100% - 34vh - 42px);
+            box-sizing: border-box;
             overflow: auto;
             overflow: auto;
             > p {
             > p {
               font-size: 16px;
               font-size: 16px;
@@ -400,7 +404,7 @@ onMounted(() => {
             }
             }
           }
           }
           .goods-button {
           .goods-button {
-            flex: 0;
+            // flex: 0;
             display: flex;
             display: flex;
             justify-content: space-between;
             justify-content: space-between;
             font-size: 16px;
             font-size: 16px;