npm.io
0.0.1 • Published 7 years ago

sinobest-rc-image-edit

Licence
private
Version
0.0.1
Deps
5
Size
54 kB
Vulns
0
Weekly
0

sinoest-rc-image-edit

本模块为图片编辑组件,包含可配置的上传、摄像头拍照及图片裁剪功能。

安装/Install

yarn add sinobest-rc-image-edit

使用样例/Use

import React, {Component} from 'react';
import { SinoImageEdit } from 'sinobest-rc-image-upload';

export default class ImagePluginDemo extends Component {
  getImageList = (imageList) => {
    console.info('imageList:', imageList);
  }

  render() {
    return (
      <div className={styles.image_plugin_container}>
        <SinoImageEdit width={600} height={400} max={5} onClick={this.getImageList} />
      </div>
    );
  }
}

API

参数 说明 类型 默认值
width 图片区域宽度 Number 600
height 图片区域高度 Number 400
upload 图片上传功能开关 Boolean true
camera 摄像头拍照功能开关 Boolean true
cropper 裁剪功能开关 Boolean true
max 最大处理图片数 Number 3
onClick 图片处理保存回调函数 Function -
multiple 允许多图上传 Boolean false

Keywords