vue cropper

 1 <vueCropper
 2         ref="cropper"
 3         :img="cropImg.img"
 4         :outputSize="cropImg.size"
 5         :outputType="cropImg.outputType"
 6         :info="cropImg.info"
 7         :canScale="cropImg.canScale"
 8         :autoCrop="cropImg.autoCrop"
 9         :autoCropWidth="cropImg.autoCropWidth"
10         :autoCropHeight="cropImg.autoCropHeight"
11         :fixed="cropImg.fixed"
12         :fixedNumber="cropImg.fixedNumber"
13       ></vueCropper>
this.$refs.cropper.startCrop()  //开始截图

this.$refs.cropper.stopCrop() //截图结束
// 获取截取后图片的数据
this.$refs.cropper.getCropData((data) => {
// callback
})

https://github.com/xyxiao001/vue-cropper

http://xyxiao.cn/vue-cropper/example/

posted on 2017-07-24 17:08  前路亦是故乡  阅读(944)  评论(0编辑  收藏  举报

导航