diff --git a/src/Crop.php b/src/Crop.php index 2825395..6da1ebb 100644 --- a/src/Crop.php +++ b/src/Crop.php @@ -160,7 +160,9 @@ function cropper(imgSrc,cropperFileE,w,h) //默认关闭框 cropperFileE.nextAll('.cropper-img').attr('src',imgSrc); //替换提交数据 - cropperFileE.nextAll('.cropper-input').val(imgSrc); + if (cropperFileE.nextAll('.cropper-input').val() == '') { + cropperFileE.nextAll('.cropper-input').val(imgSrc); + } //销毁剪裁器实例 cropper.destroy(); },