zlisen пре 3 година
родитељ
комит
f7e7eafbcc
1 измењених фајлова са 7 додато и 3 уклоњено
  1. 7
    3
      src/components/XForm/ImageListUpload.jsx

+ 7
- 3
src/components/XForm/ImageListUpload.jsx Прегледај датотеку

49
         okText: '确认',
49
         okText: '确认',
50
         okType: 'danger',
50
         okType: 'danger',
51
         cancelText: '取消',
51
         cancelText: '取消',
52
-        onOk() {
53
-          const fileList = (this.props.value || []).filter(x => getImgURL(x) != e.file.url);
54
-          this.props.onChange(fileList);
52
+        onOk:() =>{
53
+ 
54
+          if (typeof this.props?.onChange === 'function') {
55
+            const fileList = (this.props.value || []).filter(x => getImgURL(x) != e.file.url);
56
+            this.props.onChange(fileList);
57
+          }
58
+         
55
         },
59
         },
56
       });
60
       });
57
     }
61
     }