vue-cropper-image
vue-cropperjs
a vue component wrapper for cropperjs.
Build Setup
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
Usage
import cropper from 'vue-cropper-image';
<cropper :src='src' :aspectRatio="16/9" :show="true"/>
Options
Most options of cropperjs is supported. Some component options as follow:
src
- type: String
- default: NaN Define the path of image that need to be cropped.
[Notice] Once the value of the src changing, the cropper wrapper will be show
Methods
croped
- params: canvas
when pressing yes btn ,it will dispatch this event.it return the result of
cropper.getCroppedCanvas()as it's params.
Support
pc and H5 website
TODO:
- support choose local image file
- support xhr upload
Related Packages
cropper-next-vue
A Vue 3 image cropper focused on rotation, boundary control, and clean library d...
3,819
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.4 | ^2.5.2 | ISC | |
| 1.0.2 | ^2.5.2 | ISC | |
| 1.0.1 | ^2.5.2 | ISC | |
| 1.0.0 | ^2.5.2 | ISC |
