Commit 35ff085e by 姜雷

修改图片上传处更新问题

parent b7d988e9
......@@ -26,11 +26,9 @@ class ImagePicker extends Component {
files: [],
};
}
shouldComponentUpdate(nextProps, nextState) {
const { value } = nextProps;
const { files, done } = nextState;
console.log(value, files);
if (!value && files.length) {
shouldComponentUpdate(nextProps) {
const { value } = this.props;
if (!nextProps.value && value) {
this.deleteImage();
}
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