## vue-cropper
### A simple picture clipping plugin for vue
[preview](http://xyxiao.cn/vue-cropper/example/)
[中文](https://github.com/xyxiao001/vue-cropper)
### Vue-cropper Related Articles Reference.。
#### [vue全家桶开发管理后台—裁切图片](https://blog.csdn.net/qq_30632003/article/details/79639346) 作者: 麻球科技-菅双鹏
#### [Vue-cropper 图片裁剪的基本原理](https://www.cnblogs.com/tugenhua0707/p/8859291.html) 作者: 龙恩0707
### vue-cropper communication.。
##### Any comments, or bugs or want to develop vue-cropper together, or want to develop other plugins together
![](https://qn-qn-kibey-static-cdn.app-echo.com/4C6FE9E2-3D06-402B-8F32-98B82BEBDD9F.png)
# vue-cropper
#### Install
```
npm install vue-cropper
yarn add vue-cropper
```
#### Use
```
views
import { VueCropper } from "vue-cropper"
components: {
VueCropper,
},
main.js
import VueCropper from "vue-cropper"
Vue.use(VueCropper)
cdn
Vue.use(window['vue-cropper'])
name | Features | Detail | value |
img | Picture address | null | url address || base64 || blob |
outputSize | Crop the quality of the generated image | 1 | 0.1 - 1 |
outputType | Crop the format of the generated image | jpg (jpg need jpeg) | jpeg || png || webp |
info | Crop box size information | true | true || false |
canScale | Whether the image allows the wheel to zoom | true | true || false |
autoCrop | Whether to generate a screenshot box by default | false | true || false |
autoCropWidth | Default generation of screenshot frame width | parent's 80% | 0~max |
autoCropHeight | Default generation of screenshot frame Height | parent's 80% | 0~max |
fixed | Whether to open the screenshot frame width and height fixed ratio | true | true | false |
fixedNumber | The aspect ratio of the screenshot box | [1 : 1] | [width : height] |
full | Screenshot of whether to output the original map scale | false | true | false |
fixedBox | Fixed screenshot frame size is not allowed to change | false | true | false |
canMove | Whether the uploaded image can be moved | true | true | false |
canMoveBox | Can the screenshot box be dragged? | true | true | false |
original | Upload images are rendered in raw scale | false | true | false |
centerBox | Is the screenshot box restricted to the image? | false | true | false |
high | Is it proportional to the dpi output of the device? | true | true | false |
infoTrue | True to show the true output image width and height false show the width of the screenshot frame | false | true | false |
maxImgSize | Limit the maximum width and height of the image | 2000 | 0-max |
enlarge | Picture output ratio multiplier based on screenshots | 1 | 0-max(Don't be too big.) |
mode | img render mode | contain | contain , cover, 100px, 100% auto |