Skip to content

Commit a261a10

Browse files
committed
修复原图编辑bug
1 parent 47bdfe7 commit a261a10

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Crop.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ function cropper(imgSrc,cropperFileE,w,h)
160160
//默认关闭框
161161
cropperFileE.nextAll('.cropper-img').attr('src',imgSrc);
162162
//替换提交数据
163-
cropperFileE.nextAll('.cropper-input').val(imgSrc);
163+
if (cropperFileE.nextAll('.cropper-input').val() == '') {
164+
cropperFileE.nextAll('.cropper-input').val(imgSrc);
165+
}
164166
//销毁剪裁器实例
165167
cropper.destroy();
166168
},

0 commit comments

Comments
 (0)