傅行帆 5 年之前
父節點
當前提交
9302d79ca8
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/components/uploadImage/ImageUpload.jsx

+ 1
- 1
src/components/uploadImage/ImageUpload.jsx 查看文件

@@ -35,7 +35,7 @@ class ImageUpload extends React.Component {
35 35
     const { status, response } = file
36 36
     this.setState({ fileList, loading: status === "uploading" })
37 37
 
38
-    if (typeof this.props.onChange === 'function') {
38
+    if (typeof this.props.onChange === 'function' && status != "uploading") {
39 39
       const image = status === 'done' ? response : undefined
40 40
       this.props.onChange(image);
41 41
     }