0.0.8 • Published 4 years ago

m2-image-cropper v0.0.8

Weekly downloads
28
License
MIT
Repository
-
Last release
4 years ago

#m2-image-cropper 基于CropperJs的angular lib封装

##Installation Using npm:

$ npm i m2-image-cropper --save 
$ npm i cropperjs --save 

修改angular.json

"styles": [
  "./src/assets/css/font-awesome.css",
   "./node_modules/cropperjs/dist/cropper.min.css"       
  ],
  "scripts": [
    "./node_modules/cropperjs/dist/cropper.js"
   ]
 

##Usage 1、module中引入M2ImageCropperModule

2、页面中使用:

<m2-image-cropper [mode]="'fix'" [aspectRatio]="1/1" (imgCropperChange)="imgCroppered($event)">
</m2-image-cropper>

mode: fix或者free两种模式

aspectRatio: 如果是fix模式,必须给出横纵比

imgCropperChange: 裁剪完成后会向外抛出image的DataUrl

##License

MIT

##Dev 虚竹

0.0.8

4 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

0.0.0

5 years ago