图片在裁剪中表单提交,则自动把内容裁剪提交
This commit is contained in:
parent
be462a25d2
commit
48dd654ce7
|
@ -569,8 +569,6 @@ export default class ImageControl extends React.Component<
|
|||
}
|
||||
|
||||
return this.setState({
|
||||
locked: true,
|
||||
lockedReason: '请选择放弃或者应用',
|
||||
cropFile: file
|
||||
});
|
||||
}
|
||||
|
@ -853,6 +851,11 @@ export default class ImageControl extends React.Component<
|
|||
validate(): any {
|
||||
if (this.state.locked && this.state.lockedReason) {
|
||||
return this.state.lockedReason;
|
||||
} else if (this.state.cropFile) {
|
||||
return new Promise(resolve => {
|
||||
this.resolve = resolve;
|
||||
this.handleCrop();
|
||||
});
|
||||
} else if (
|
||||
this.state.uploading ||
|
||||
this.files.some(item => item.state === 'pending')
|
||||
|
|
Loading…
Reference in New Issue