TransFlow/node_modules/vue-cropperjs
何嘉峣 d0b8157bbe 代码提交 2022-12-15 10:56:04 +08:00
..
dist 代码提交 2022-12-15 10:56:04 +08:00
.babelrc 代码提交 2022-12-15 10:56:04 +08:00
CHANGELOG.md 代码提交 2022-12-15 10:56:04 +08:00
LICENSE 代码提交 2022-12-15 10:56:04 +08:00
README.md 代码提交 2022-12-15 10:56:04 +08:00
VueCropper.js 代码提交 2022-12-15 10:56:04 +08:00
package.json 代码提交 2022-12-15 10:56:04 +08:00
yarn.lock 代码提交 2022-12-15 10:56:04 +08:00

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

For Vue 1.0, use

npm install --save vue-cropperjs@1.0.3

You will also need css & style loader for webpack

Usage

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

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

...
<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

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