Commit 35ff085e by 姜雷

修改图片上传处更新问题

parent b7d988e9
...@@ -26,11 +26,9 @@ class ImagePicker extends Component { ...@@ -26,11 +26,9 @@ class ImagePicker extends Component {
files: [], files: [],
}; };
} }
shouldComponentUpdate(nextProps, nextState) { shouldComponentUpdate(nextProps) {
const { value } = nextProps; const { value } = this.props;
const { files, done } = nextState; if (!nextProps.value && value) {
console.log(value, files);
if (!value && files.length) {
this.deleteImage(); this.deleteImage();
} }
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment