2.2.2 • Published 6 years ago

vue-cropperjs-forward v2.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

vue-cropperjs

Forked from Agontuk/vue-cropperjs for personal usage

A Vue wrapper component for cropperjs.

NPM

Demo

Checkout here agontuk.github.io/vue-cropperjs

Installation

npm install --save vue-cropperjs-forward

For Vue 1.0, use

npm install --save vue-cropperjs@1.0.3

You will also need css & style loader for webpack

Usage

import VueCropper from 'vue-cropperjs-forward';

...
<vue-cropper
  ref="cropper"
  :src="imgSrc"
  alt="Source Image"
  :cropmove="cropImage"
>
</vue-cropper>
...

this.$refs.cropper.rotate(45);

See the example files & cropperjs documentation

Options

NameTypeRequiredDescription
srcstring--Image source
containerStyleobject--Styling for the image container
imgStyleobject--Styling for the image
altstring--Alternate text for the image

Crop related options

See cropperjs documentation for all posible options & methods.

Renamed Methods

  • relativeZoom from zoom
  • initCrop from crop

License

MIT