bill 2 lat temu
rodzic
commit
6545e9fcdf
3 zmienionych plików z 32 dodań i 21 usunięć
  1. 1 1
      src/constant/scene.ts
  2. 4 0
      src/views/scene/header.tsx
  3. 27 20
      test/index.html

+ 1 - 1
src/constant/scene.ts

@@ -14,8 +14,8 @@ export const SceneTypeDesc: { [key in SceneType]: string }  = {
   [SceneType.SWKK]: '四维看看',
   [SceneType.SWKJ]: '四维看见',
   [SceneType.SWSS]: '四维深时点云场景',
-  [SceneType.SWSSMX]: '四维深时obj模型',
   [SceneType.SWMX]: '三维模型',
+  [SceneType.SWSSMX]: '四维深时obj场景',
   // [SceneType.QJKK]: '全景看看',
 }
 

+ 4 - 0
src/views/scene/header.tsx

@@ -18,11 +18,15 @@ export const SceneHeader = memo(({ readonly, type, onSearch, onDataChange }: Lis
   const dispatch = useDispatch()
   const onUpload: UploadProps['beforeUpload'] = file => {
     const filename = file.name
+    
     const ext = filename.substring(filename.lastIndexOf('.'))
     const isZip = ['.zip'].includes(ext)
     if (!isZip) {
       message.error('只能上传zip文件')
       return Upload.LIST_IGNORE
+    } else if (file.size > 1 * 1024 * 1024 * 1024) {
+      message.error('大小在1GB以内')
+      return Upload.LIST_IGNORE
     }
     dispatch(uploadModelScene({ file }))
       .unwrap()

+ 27 - 20
test/index.html

@@ -1,35 +1,42 @@
 <!DOCTYPE html>
 <html lang="en">
+
 <head>
   <meta charset="UTF-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Document</title>
   <style>
-    .test {
-      position: relative;
-      display: inline-block;
-    }
-    img {
-      margin: 0;
-      padding: 0;
+    .box {
+      text-indent: 2em;
     }
-    h2 {
-      mix-blend-mode: screen;
-      color: #000;
-      background-color: rgba(255,255,255,.6);
-      text-align: center;
-      position: absolute;
-      left: 50%;
-      transform: translateX(-50%);
-      top: 0;
+    .box div {
+      display: inline-block;
+      /* text-indent: 0; */
     }
   </style>
 </head>
+
 <body>
-  <div class="test">
-    <img src="https://4dkk.4dage.com/images/imagesSS-t-sd04dnbZ8i/tiles/4k/0_skybox2.jpg?x-oss-process=image/resize,h_512&time=20221031163357" alt="">
-    <h2>Hello word</h2>
-  </div>
+  <input type="text" class="box" value="asdasdasd">
+    <button class="box">asdasd</button>
+    <textarea class="box">asdasd</textarea>
+    <div class="box">
+      Found a problem with this page?
+      Found a problem with this page?
+      Found a problem with this page?
+      Found a problem with this page?
+      Found a problem with this page?
+      <div>
+        Found a problem with this page?
+        Found a problem with this page?
+
+      </div>
+      Found a problem with this page?
+      Found a problem with this page?
+
+
+    </div>
 </body>
+
 </html>