Browse Source

fix(CropperModal): beforeUpload should return false (#3601)

pull/3608/head
xachary 2 years ago
committed by GitHub
parent
commit
b6bcf8d36d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/components/Cropper/src/CropperModal.vue

2
src/components/Cropper/src/CropperModal.vue

@ -152,7 +152,7 @@
function handleBeforeUpload(file: File) {
if (props.size && file.size > 1024 * 1024 * props.size) {
emit('uploadError', { msg: t('component.cropper.imageTooBig') });
return;
return false;
}
const reader = new FileReader();
reader.readAsDataURL(file);

Loading…
Cancel
Save