1.0.4 • Published 6 years ago

vue-cropper-image v1.0.4

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

vue-cropperjs

a vue component wrapper for cropperjs.

NPM

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
1.0.4

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago