1.0.1 • Published 3 years ago

igg-vue-image-cropper v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

igg-vue-image-cropper

npm.io

npm.io

Install

npm install igg-vue-image-cropper
// or
yarn add igg-vue-image-cropper

Simple Usage

<template>
  <div>
    <igg-vue-image-cropper @change="onChange" />
  </div>
</template>

<script>

export default {
  methods: {
    onChange (data) {
      console.log(data)
    }
  }
}
</script>

Plugin

import Vue from 'vue'
import IggVueImageCropper from 'igg-vue-image-cropper'
import 'igg-vue-image-cropper/dist/igg-vue-image-cropper.css'

Vue.use(IggVueImageCropper)

Props

PropTypeDefaultDescription
sizenumber5size limit of file
namestring''name for input file
previewstring''preview image url
imageNamestring''name of image
dataCystring'upload-image'dataCy for test
boundaryWidthnumber500width for cropper
boundaryHeightnumber500height for cropper
placeholderstring''placeholder for cropper
maxHeightPreviewnumber500height width for preview
modalTitleMessagestring'ปรับขนาดภาพ'message for title in modal
sizeMessagestring'ขนาดไฟล์ไม่เกิน'message for size in modal
supportFileMessagestring'รองรับไฟล์ .jpg และ .png ขนาด : 'message for support file in modal
cancelBtnMessagestring'ยกเลิก'message for button cancel in modal
submitBtnMessagestring'บันทึก'message for button submit in modal

Events

PropResponseDescription
change{ file, crop, preview }change when data changing
errorSizesizeerror size
1.0.1

3 years ago

1.0.0

3 years ago

0.0.1

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago