handleChange = (info) => {
if (info.file.status === 'uploading') {
this.setState({loading: true});
return;
}
if (info.file.status === 'done') {
// Get this url from response in real world.
this.setState({
avatar: info.file.response.url
}, () => {
this.getBase64(info.file.originFileObj, imageUrl => {
this.setState({
imageUrl,
loading: false,
})
});
});
}
};
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…