Skip to content

Commit d7bc0d9

Browse files
committed
cropRatio非1:1的情况下,裁剪区域超出图片范围
1 parent 5d45238 commit d7bc0d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/crop.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export default {
253253
this.width = w;
254254
this.height = h;
255255
} else {
256-
if (r >= 1) {
256+
if (r >= this.cropCSS.width/this.cropCSS.height) {
257257
this.height = this.cropCSS.height;
258258
this.width = this.height * r;
259259
} else {

0 commit comments

Comments
 (0)