vue_tom_crop_image

1.1.0 • Public • Published

tom-crop-image

A Vue.js project

Build Setup

# install dependencies
npm install
 
# serve with hot reload at localhost:8080
npm run dev
 
# build for production with minification
npm run build
 
# build for production and view the bundle analyzer report
npm run build --report

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

image

tom-crop-image use hammerjs

on pc user should press both shift key and left mouse to rotate

step 1:install in your main.js

import TomCrop from 'vue_tom_crop_image'
Vue.use(TomCrop)

step 2:use in your component

<tom-crop
:data-show='showCrop'
:data-width='400'
:data-height='200'
@on-success='getCropSuccess'
@on-hide='showCrop=false'
></tom-crop>
 
// methods
 getCropSuccess(detail){
    console.log('img src for base64',detail.base64);
    detail.dfd.done(function(blob){
      console.log('img for blob file',blob);
    })
 }

Readme

Keywords

none

Package Sidebar

Install

npm i vue_tom_crop_image

Weekly Downloads

3

Version

1.1.0

License

none

Unpacked Size

2.7 MB

Total Files

49

Last publish

Collaborators

  • tom.chang