shaogen1995 8 kuukautta sitten
vanhempi
commit
a772acff2e
2 muutettua tiedostoa jossa 32 lisäystä ja 22 poistoa
  1. 25 19
      Code/src/components/Zhot/index.module.scss
  2. 7 3
      Code/src/components/Zhot/index.tsx

+ 25 - 19
Code/src/components/Zhot/index.module.scss

@@ -10,6 +10,31 @@
   z-index: 9999;
   display: flex;
   :global {
+    // 所有图片盒子
+    .ZHimgBox {
+      overflow-x: auto;
+      width: 100%;
+      height: auto;
+      // white-space: nowrap;
+      display: inline-block;
+      &::-webkit-scrollbar {
+        display: none;
+      }
+      .adm-image {
+        display: inline-block;
+        width: auto;
+        margin: 0 10px 10px;
+        height: 130px;
+        img {
+          display: inline-block;
+          width: auto;
+          // width: 100%;
+          height: 100%;
+          object-fit: fill !important;
+        }
+      }
+    }
+
     p {
       text-align: justify;
     }
@@ -134,25 +159,6 @@
               }
             }
           }
-
-          // 三级图片
-          .adm-image {
-            width: 90%;
-            // margin: 0 auto;
-            height: auto;
-            min-height: 60px;
-            margin-bottom: 10px;
-            .adm-image-tip {
-              min-height: 60px;
-            }
-            img {
-              width: auto;
-              // width: 100%;
-              height: 100%;
-              object-fit: fill !important;
-              max-height: 140px;
-            }
-          }
         }
         .ZH1main2 {
           position: absolute;

+ 7 - 3
Code/src/components/Zhot/index.tsx

@@ -135,9 +135,13 @@ function Zhot({ name, closeFu }: Props) {
             {/* -----------三级信息------------- */}
             {acObj3.name ? (
               <div className='ZH1main1 ZH1main1Son'>
-                {acObj3.type === '图片'
-                  ? acObj3.urlArr.map(url => <LazyImg src={baseURL + url} key={url} />)
-                  : null}
+                {acObj3.type === '图片' ? (
+                  <div className='ZHimgBox'>
+                    {acObj3.urlArr.map(url => (
+                      <LazyImg src={baseURL + url} key={url} />
+                    ))}
+                  </div>
+                ) : null}
 
                 {['模型', '视频'].includes(acObj3.type) ? (
                   <div className='H2model' style={{ height: acObj3.text ? '200px' : '280px' }}>