vue-slim-cropper
v0.1.1
Published
💇 A simple and elegant mobile image crop upload component for Vue 2.x | 简洁易用的 vue 移动端图片裁剪上传组件
Downloads
460
Maintainers
Readme
vue-slim-cropper
English | 简体中文
🌰 Example
🚀 QuickStart
- Install
yarn add vue-slim-cropper # OR npm i -S vue-slim-cropper
- Import
// main.js
import SlimCropper from 'vue-slim-cropper'
Vue.use(SlimCropper)
- 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 ~
Changelog
License
Copyright (c) 2018-present, komo