vue-cropperjs
A Vue wrapper component for cropperjs

vue-cropperjs downloads vue-cropperjs version vue-cropperjs license

vue-cropperjs類似套件:
npm下載趨勢
3 年
🌟 在 vue-cropperjs 的 README.md 中顯示即時使用量圖表,只需複製下面的代碼。
## Usage Trend
[![Usage Trend of vue-cropperjs](https://npm-compare.com/img/npm-trend/THREE_YEARS/vue-cropperjs.png)](https://npm-compare.com/vue-cropperjs#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 在 vue-cropperjs 的 README.md 中顯示 GitHub stars 趨勢圖表,只需複製下面的代碼。
## GitHub Stars Trend
[![GitHub Stars Trend of vue-cropperjs](https://npm-compare.com/img/github-trend/vue-cropperjs.png)](https://npm-compare.com/vue-cropperjs)
統計詳情
套件
下載數
Stars
大小
Issues
發布時間
許可
vue-cropperjs62,471965-365 年前MIT
vue-cropperjs 的 README

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 |

Crop related options

See cropperjs documentation for all posible options & methods.

Renamed Methods

  • relativeZoom from zoom
  • initCrop from crop

License

MIT