为了账号安全,请及时绑定邮箱和手机立即绑定

js图片剪裁工具cropper使用问题

js图片剪裁工具cropper使用问题

慕标琳琳 2018-09-15 10:12:40
这是cropper的演示页面:https://fengyuanchen.github.i...我想使用旋转按钮,就是下面红框中的两个:按照文档操作https://github.com/fengyuanch...<div class="btn-group" role="group" aria-label="Basic example">   <button id="rotateLeft" type="button" class="btn btn-secondary" data-method="rotate" data-option="-90" title="左转">       <i class="fa fa-undo" aria-hidden="true">左转90度</i>   </button>   <button id="rotateRight" type="button" class="btn btn-secondary" data-method="rotate" data-option="90" title="右转">       <i class="fa fa-repeat" aria-hidden="true">右转90度</i>   </button></div>$("#rotateLeft").cropper('rotate', -90); $("#rotateRight").cropper('rotate', 90);可是不能使用,浏览器提示Cannot read property 'rotate' of undefined看了一下js源代码: https://fengyuanchen.github.i... 没看懂是怎么触发按钮的,请大神帮讲一下过程。
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 1147 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信