所属分类:媒体-图片展示,图像
裁剪框的尺寸能修改吗?比如我要正方形的图
$('.container > img').cropper('destroy'); $('.container > img').cropper('enable'); aspectRatio: 8 / 8, 都行
aspectRatio: 8 / 8,设置比例即可
报错哇!
Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
不支持本地uri路径,部署到正式的web上面用httpurl就正常了
放到服务器上试试