vue-cropper-image
v1.0.4
Published
a vue component wrapper for cropperjs
Downloads
10
Maintainers
Readme
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