You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
unknown fe79185e87 ali aslani пре 1 година
..
dist ali aslani пре 1 година
.babelrc ali aslani пре 1 година
CHANGELOG.md ali aslani пре 1 година
LICENSE ali aslani пре 1 година
README.md ali aslani пре 1 година
VueCropper.js ali aslani пре 1 година
package.json ali aslani пре 1 година

README.md

vue-cropperjs

A Vue wrapper component for cropperjs.

NPM

Demo

Checkout here agontuk.github.io/vue-cropperjs

Installation

npm install --save vue-cropperjs

or

yarn add vue-cropperjs

You will also need css & style loader for webpack

Compatibility

Vue Version Package Version
3.x.x >=5.0.0
2.x.x 4.2.0
1.x.x 1.0.3

Usage

// Global
import Vue from 'vue';
import VueCropper from 'vue-cropperjs';
import 'cropperjs/dist/cropper.css';
Vue.component(VueCropper);

// Local
import VueCropper from 'vue-cropperjs';
import 'cropperjs/dist/cropper.css';
export default {
  components: { VueCropper}
}

...
<vue-cropper
  ref="cropper"
  :src="imgSrc"
  alt="Source Image"
  @ready="..."
  @cropstart="..."
  @cropmove="..."
  @cropend="..."
  @crop="..."
  @zoom="..."
>
</vue-cropper>
...

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

See the example files & cropperjs documentation

Options

Name Type Required Description
src string -- Image source
containerStyle object -- Styling for the image container
imgStyle object -- Styling for the image
alt string -- Alternate text for the image

See cropperjs documentation for all posible options & methods.

Renamed Methods

  • relativeZoom from zoom
  • initCrop from crop

License

MIT