mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
commit
aad00bb919
@ -1107,6 +1107,7 @@ export default class ImageControl extends React.Component<
|
|||||||
|
|
||||||
handleCrop() {
|
handleCrop() {
|
||||||
const {cropFormat, cropQuality} = this.props;
|
const {cropFormat, cropQuality} = this.props;
|
||||||
|
const originFormat = this.state.cropFile?.type || 'image/png';
|
||||||
this.cropper.getCroppedCanvas().toBlob(
|
this.cropper.getCroppedCanvas().toBlob(
|
||||||
(file: File) => {
|
(file: File) => {
|
||||||
this.addFiles([file]);
|
this.addFiles([file]);
|
||||||
@ -1116,7 +1117,7 @@ export default class ImageControl extends React.Component<
|
|||||||
lockedReason: ''
|
lockedReason: ''
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cropFormat || 'image/png',
|
cropFormat || originFormat,
|
||||||
cropQuality || 1
|
cropQuality || 1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user