viniazvd / vue-croep

:selfie: a lightweight library for cropping images :scissors:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue-croep ✅

License


Example


Install

yarn add vue-croep or npm install vue-croep

Example

<template>
  <div>
    <vue-croep ref="croep" />

    <button @click="crop">crop</button>
  </div>
</template>

<script>
import VueCroep from 'vue-croep'
import 'vue-croep/dist/vue-croep.css'

export default {
  name: 'example',

  components: { VueCroep },

  methods: {
    crop () {
      this.$refs.croep.crop()
    }
  }
}
</script>

Props

Name type default About
size Number 300 container size
src String mengão picture image to crop

Event

Name About
cropped return base64 of cropped image

contributors:

Made in: @convenia

About

:selfie: a lightweight library for cropping images :scissors:


Languages

Language:Vue 91.6%Language:JavaScript 8.4%