Gathering detailed insights and metrics for vue-img-cutter
Gathering detailed insights and metrics for vue-img-cutter
Gathering detailed insights and metrics for vue-img-cutter
Gathering detailed insights and metrics for vue-img-cutter
vue-img-cutter-zj
A image crop plug-in for Vue,you can use it to rotate、zoom images and cut any size
vue-img-cutter-ctw
基于vue-img-cutter修改,裁剪框默认大小为img * rate后的大小
vue-img-cutter-sy
A image crop plug-in for Vue,you can use it to rotate、zoom images and cut any size
vue-img-cutter-dwg
简单易用的vue图片裁剪插件,支持移动图像,裁剪图片,放大缩小图片,上下左右移动,固定比例,固定尺寸,远程图片裁剪,只需要很少的代码就可以实现裁剪功能,也可以通过调整参数以适应你自己的业务需求。
简单易用的vue图片裁剪插件,支持移动图像,裁剪图片,放大缩小图片,上下左右移动,固定比例,固定尺寸,远程图片裁剪,只需要很少的代码就可以实现裁剪功能,也可以通过调整参数以适应你自己的业务需求。
npm install vue-img-cutter
Typescript
Module System
Node Version
NPM Version
Vue (95.12%)
JavaScript (4.22%)
HTML (0.65%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
533 Stars
235 Commits
80 Forks
5 Watchers
4 Branches
4 Contributors
Updated on Jul 14, 2025
Latest Version
3.0.7
Package Id
vue-img-cutter@3.0.7
Unpacked Size
118.14 kB
Size
18.99 kB
File Count
5
NPM Version
10.8.2
Node Version
18.20.5
Published on
Mar 17, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A image crop plug-in for Vue,you can use it to rotate、zoom images and cut any size
https://www.ihtmlcss.com/demo/dist/#/croptool
Github:https://github.com/acccccccb/vue-img-cutter
码云:https://gitee.com/GLUESTICK/vue-img-cutter
If this project is helpful to you, please give me a star :)
1npm install vue-img-cutter@2 --save-dev # for vue2 2npm install vue-img-cutter@3 --save-dev # for vue3
1import ImgCutter from 'vue-img-cutter' 2export default { 3 components:{ 4 ImgCutter 5 }, 6... 7}
1<ImgCutter v-on:cutDown="cutDown"></ImgCutter>
1<ImgCutter v-on:cutDown="cutDown"> 2 <template #open> 3 <button>Choose image</button> 4 </template> 5</ImgCutter>
- Create an object(name,src,
width and heightare required).
- this.$refs.imgCutterModal.handleOpen(The Object).
1// The object like this. 2let obj = { 3 name: '1.jpg', //Image name 4 src: 'http://url/1.jpg', // Image url 5 //width:200,//Image width remove in 2.1.9+ 6 //height:200,//Image height remove in 2.1.9+ 7};
1ForIE9:function(){ 2 // First you need create object have name,src. 3 // Then trigger handleOpen(obj) and deliver the obj. 4 this.$refs.imgCutterModal.handleOpen({ 5 name:"image.jpg", 6 src:"http://imageServ.com/image.jpg", 7 }); 8}
Attribute | Effect | Type | Require | Default |
---|---|---|---|---|
isModal | Is modal | Boolean | No | true |
showChooseBtn | Show select btn | Boolean | No | true |
lockScroll | Lock scroll when modal is show | Boolean | No | true |
modalTitle | Modal title text | String | No | 图片裁剪 |
label | Button text | String | No | 选择图片 |
boxWidth | Tool width | Number | No | 800 |
boxHeight | Tool height | Number | No | 400 |
cutWidth | Selection box width | Number | No | 200 |
cutHeight | Selection box height | Number | No | 200 |
tool | Show toolbar | Boolean | No | true |
toolBgc | Toolbar background color | String(eg: "#fff") | No | #fff |
sizeChange | Allow change size | Boolean | No | true |
moveAble | Allow change position | Boolean | No | true |
originalGraph | Crop original image | Boolean | No | false |
crossOrigin | Is cross origin image | Boolean | No | false |
crossOriginHeader | Set cross origin header | String | No | '' |
rate | Aspect ratio | String(eg: "4:3") | No | - |
WatermarkText | Watermark Text | String | No | '' |
WatermarkTextFont | Watermark font size | String | No | '12px Sans-serif' |
WatermarkTextColor | Watermark font color | String | No | '#fff' |
WatermarkTextX | Watermark position x | Number | No | 0.95 |
WatermarkTextY | Watermark position y | Number | No | 0.95 |
smallToUpload | If choose image size less then defined Size,return file. sizeChange must be false | Boolean | No | false |
saveCutPosition | Save last cut position and size | Boolean | No | false |
scaleAble | Allow scale image | Boolean | No | true |
imgMove | Allow move image | Boolean | No | true |
toolBoxOverflow | Allow tool box out of picture range | Boolean | No | true |
index | Return with result | Any | No | null |
previewMode | Return results at any time,in case of performance problems, set this to false | Boolean | No | true |
fileType | Return file type ( png / jpeg / webp) | String | No | png |
quality | image quality | Number | No | 1 |
accept | accept file type | String | No | 'image/gif, image/jpeg ,image/png' |
afterChooseImg | Before choose image | () => Promise.resolve(Boolean) | No | - |
Attribute | Effect | Type | Require | Return |
---|---|---|---|---|
cutDown | Cut down image | Function | Yes | Object |
error | Throw error | Function | No | Error object |
onChooseImg | ChooseImg | Function | No | Object |
onPrintImg | Print image to canvas | Function | No | Object |
onClearAll | Clear all | Function | No | null |
onImageLoadComplete | Image loading completed | Function | No | Object |
onImageLoadError | Image loading failed | Function | No | Object |
Slot name | Effect |
---|---|
open | Choose btn |
openImgCutter | Choose btn |
choose | Choose btn(in tool) |
cancel | Cancel btn |
confirm | Confirm btn |
ratio | Toolbar ratio |
scaleReset | Toolbar reset scale |
turnLeft | Toolbar turn left |
turnRight | Toolbar turn right |
reset | Toolbar reset |
flipHorizontal | Toolbar flip horizontal |
flipVertically | Toolbar flip vertically |
Attribute | Description |
---|---|
fileName | File name |
file | File(Some versions of IE is not support) |
blob | Blob(Some versions of IE is not support) |
dataURL | dataURL |
bugfix:#note_11139264
bugfix:#64
New prop( quality ) : A Number between 0 and 1 indicating the image quality
bugfix:#I4SDOE
bugfix: dialog-footer default height 40px
bugfix: width height x and y convert to int
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/29 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
45 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More