|
- <view class="container data-v-7e5aa06e"><button data-event-opts="{{[['tap',[['chooseImage',['$event']]]]]}}" bindtap="__e" class="data-v-7e5aa06e">选择图片</button><block wx:if="{{imagePath}}"><view class="canvas-container data-v-7e5aa06e"><canvas style="{{'width:'+(canvasWidth+'px')+';'+('height:'+(canvasHeight+'px')+';')}}" canvas-id="imageCanvas" class="data-v-7e5aa06e"></canvas><view data-event-opts="{{[['touchstart',[['startDrag',['$event']]]],['touchmove',[['drag',['$event']]]],['touchend',[['endDrag',['$event']]]]]}}" class="{{['data-v-7e5aa06e','crop-area',cropShape==='circle'?'circle':'rectangle']}}" style="{{'left:'+(cropX+'px')+';'+('top:'+(cropY+'px')+';')+('width:'+(cropWidth+'px')+';')+('height:'+(cropHeight+'px')+';')}}" bindtouchstart="__e" bindtouchmove="__e" bindtouchend="__e"></view></view></block><view class="button-group data-v-7e5aa06e"><button data-event-opts="{{[['tap',[['changeCropShape',['$event']]]]]}}" bindtap="__e" class="data-v-7e5aa06e">切换裁剪形状</button><button data-event-opts="{{[['tap',[['resetCanvas',['$event']]]]]}}" bindtap="__e" class="data-v-7e5aa06e">重置画布</button><button data-event-opts="{{[['tap',[['cropImage',['$event']]]]]}}" bindtap="__e" class="data-v-7e5aa06e">裁剪图片</button></view></view>
|