Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-cropper

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-cropper

A simple Vue picture clipping plugin

  • 0.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17K
decreased by-3.44%
Maintainers
1
Weekly downloads
 
Created
Source

vue-crpopper

一个优雅的图片裁剪插件

预览

vue-cropper

安装 npm install vue-cropper
使用 import VueCropper from vue-cropper
<vueCropper
  ref="cropper"
  :img="option.img"
  :outputSize="option.size"
  :outputType="option.outputType"
></vueCropper>
名称功能默认值可选值
img裁剪图片的地址url 地址 || base64 || blob
outputSize裁剪生成图片的质量10.1 - 1
outputType裁剪生成图片的格式jpg (jpg 需要传入jpeg)jpeg || png || web
info裁剪框的大小信息truetrue || false
canScale图片是否允许滚轮缩放truetrue || false
autoCrop是否默认生成截图框falsetrue || false
autoCropWidth默认生成截图框宽度容器的80%0~max
autoCropHeight默认生成截图框高度容器的80%0~max

内置方法 通过this.$refs.cropper 调用

this.$refs.cropper.startCrop() 开始截图
this.$refs.cropper.stopCrop() 停止截图
this.$refs.cropper.clearCrop() 清除截图
this.$refs.cropper.getCropDate() 获取截图信息

Keywords

FAQs

Package last updated on 11 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc