傅行帆 5 лет назад
Родитель
Сommit
9302d79ca8
1 измененных файлов: 1 добавлений и 1 удалений
  1. 1
    1
      src/components/uploadImage/ImageUpload.jsx

+ 1
- 1
src/components/uploadImage/ImageUpload.jsx Просмотреть файл

35
     const { status, response } = file
35
     const { status, response } = file
36
     this.setState({ fileList, loading: status === "uploading" })
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
       const image = status === 'done' ? response : undefined
39
       const image = status === 'done' ? response : undefined
40
       this.props.onChange(image);
40
       this.props.onChange(image);
41
     }
41
     }