New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-img-cropper

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-img-cropper

A image cropper integarated by react-image-crop for React

latest
Source
npmnpm
Version
1.0.0-alpha.1
Version published
Maintainers
1
Created
Source

react-img-cropper

基于 react-image-crop 封装了一层,支持 antdUpload 组件和简单 file 类型的 input

package 中包含 esumd(CommonJS & umd 混合) 两种 module,开发者可按需引用

使用

es import

import ReactImgCropper from 'react-img-cropper';

...
<ReactImgCropper
  uploadedImgBase64={uploadedImgBase64}
  uploadedImgFile={uploadedImgFile}
  setCroppedImgBlob={setCroppedImgBlob}
  setCroppedImgObjectURL={setCroppedImgObjectURL}
  showPreviewText
/>
...

开发调试

# 安装依赖
$ yarn install

# 调试
$ npm run examples:debug

# 构建
$ npm run build

# 发布
$ npm run publish

示例代码

支持

  • antdUpload 组件
  • 简单 file 类型的 input

依赖

  • node
  • npm
# 安装依赖
$ yarn install

# 构建 examples 代码
# 启动 node server,处理图片上传,上传图片目录: examples/static/uploadedImg
$ npm run examples

Keywords

react

FAQs

Package last updated on 15 Dec 2019

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