jcrop

qq_25264839 qq_25264839 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
用这个插件剪切图片,发现更换图片后大图不更新,小图更新了,求大牛帮忙解决啊,下面贴上问题代码
var msg = $.parseJSON(data);
if( msg.result_code == 1 ){
/*$("#row").hide();*/
$("#img").val( msg.result_des );
$("#target").attr("src",msg.result_des);
$(".preview").attr("src",msg.result_des);
$("#target").Jcrop({
minSize: [50,50],
setSelect: [0,0,200,200],
onChange:updatePreview,
onSelect:updatePreview,
onSelect:updateCoords,
aspectRatio:1
},
function(){
// Use the API to get the real image size
var bounds = this.getBounds();
boundx = bounds[0];
boundy = bounds[1];
// Store the API in the jcrop_api variable
jcrop_api = this;
});
//jcrop_api.setImage(msg.result_des);
$(".imgchoose").show(1000);
$("#avatar_submit").show(1000);
} else {
alert('上传失败');
}
},
...全文

相关推荐

评论 1
收藏 已收藏
分享
返回顶部
qq_25264839
JavaScript 87,983 成员 224,681 内容