diff --git a/client/web/src/components/modals/ImageCropper.tsx b/client/web/src/components/modals/ImageCropper.tsx index e5fa1b53..d7c83df0 100644 --- a/client/web/src/components/modals/ImageCropper.tsx +++ b/client/web/src/components/modals/ImageCropper.tsx @@ -88,7 +88,7 @@ function getCroppedImg( if (!_isNil(ctx)) { // 计算最大尺寸 - const size = Math.min(crop.width, crop.height, maxSize); + const size = Math.min(Math.max(crop.width, crop.height), maxSize); // 计算缩放比例 const scale = size / Math.max(crop.width, crop.height);