Skip to content

Latest commit

 

History

History
63 lines (39 loc) · 1.78 KB

README.md

File metadata and controls

63 lines (39 loc) · 1.78 KB

vue-slim-cropper

English | 简体中文

🌰 Example

Demo

Demo Source Code

🚀 QuickStart

  1. Install
yarn add vue-slim-cropper # OR npm i -S vue-slim-cropper
  1. Import
// main.js
import SlimCropper from 'vue-slim-cropper'
Vue.use(SlimCropper)
  1. Usage. Please refer to the Demo Source Code
<SlimCropper ref="cropper" :src=""></SlimCropper>

🔌 API

Props

Name Description Type Default
src image URL String undefined
aspectRatio width / height ratio Number 1
cropperOptions cropperjs options: https://github.com/fengyuanchen/cropperjs Object null

Methods

Name Description Parameters
getCroppedBlob get the cropped image blob object type = 'image/jpeg', quality = 1

😉😘 If it is helpful to you,please encourage me with a ⭐️Star ~

License

MIT

Copyright (c) 2018-present, komo