wesmiler 6 vuotta sitten
vanhempi
commit
efe97206dc
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      public/static/weixin/js/photo.js

+ 3 - 2
public/static/weixin/js/photo.js

@@ -635,9 +635,10 @@ var app = new Vue({
             }
 
             $("#cropImg").cropper(_this.options);
+            var data = $("#cropImg").cropper('getContainerData');
             $("#cropImg").cropper('setData', {
-                width: iWidth,
-                height: iHeight
+                width: data.width,
+                height: data.height
             });
         },
         // 确定剪切