Browse Source

修改需求

bill 3 years ago
parent
commit
4f207ba102
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/views/scene/header.tsx

+ 2 - 1
src/views/scene/header.tsx

@@ -20,6 +20,7 @@ export const SceneHeader = memo(({ readonly, type, onSearch, onDataChange }: Lis
     const isZip = ['application/zip', 'application/rar'].includes(file.type)
     if (!isZip) {
       message.error('只能上传zip或rar文件')
+      return Upload.LIST_IGNORE
     }
     dispatch(uploadModelScene({ file }))
       .unwrap()
@@ -28,7 +29,7 @@ export const SceneHeader = memo(({ readonly, type, onSearch, onDataChange }: Lis
   }
 
   const renderUpload = readonly || (type === SceneType.SWMX && (
-    <Upload beforeUpload={onUpload} multiple={false} >
+    <Upload beforeUpload={onUpload} multiple={false} accept="application/zip,application/rar">
       <Button type="primary" children="上传数据" />
     </Upload>
   ))