這是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... 沒看懂是怎么觸發按鈕的,請大神幫講一下過程。
js圖片剪裁工具cropper使用問題
慕標琳琳
2018-09-15 10:12:40