Просмотр исходного кода

修改分享条数过多 h5页面展示不全问题

lxr 6 дней назад
Родитель
Сommit
93d84a3648
1 измененных файлов с 23 добавлено и 2 удалено
  1. 23 2
      HBuilderProjects/shareAiConsult.html

+ 23 - 2
HBuilderProjects/shareAiConsult.html

@@ -27,14 +27,27 @@
     }
 
     html {
+      height: 100%;
       -webkit-tap-highlight-color: transparent;
+      overflow: hidden;
     }
 
     body {
       font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
       background: var(--bg);
       color: var(--text);
-      min-height: 100vh;
+      height: 100vh;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+    }
+
+    #main {
+      flex: 1;
+      min-height: 0;
+      overflow-x: hidden;
+      overflow-y: auto;
+      -webkit-overflow-scrolling: touch;
       padding-bottom: calc(92px + var(--safe-bottom));
     }
 
@@ -66,6 +79,11 @@
       padding: 14px 15px 8px;
     }
 
+    .scroll-spacer {
+      height: calc(72px + var(--safe-bottom));
+      flex-shrink: 0;
+    }
+
     .conversation .row:last-child {
       margin-bottom: 0;
     }
@@ -605,7 +623,10 @@
 
         var convHtml = renderMessages(messages);
         if (convHtml) {
-          bodyHtml += '<section class="conversation">' + convHtml + "</section>";
+          bodyHtml +=
+            '<section class="conversation">' +
+            convHtml +
+            '</section><div class="scroll-spacer" aria-hidden="true"></div>';
         } else {
           bodyHtml += '<div class="empty">暂无对话内容</div>';
         }