浏览代码

修复bug

魏熙美 5 年前
父节点
当前提交
52f4a0d168
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. 8
    4
      src/components/XForm/ImageListUpload.jsx

+ 8
- 4
src/components/XForm/ImageListUpload.jsx 查看文件

@@ -29,10 +29,14 @@ class ImageListUpload extends React.Component {
29 29
       return;
30 30
     }
31 31
 
32
-    if (e.file.state === 'removed') {
33
-      const fileList = (this.props.value || []).filter(x => x != e.file.url);
34
-      this.props.onChange(fileList);
35
-    }
32
+    const fileList = (this.props.value || []).filter(x => x != e.file.url);
33
+    this.props.onChange(fileList);
34
+
35
+    // console.log('删除图片触发了', e.file)
36
+    // if (e.file.state === 'removed') {
37
+    //   const fileList = (this.props.value || []).filter(x => x != e.file.url);
38
+    //   this.props.onChange(fileList);
39
+    // }
36 40
 
37 41
     // if (e.file.status === "done") {
38 42
     //   this.setState({