qj-mobile-uploader
v0.0.1
Published
QJYD React Image Uploader for Mobile
Downloads
2
Readme
qj-mobile-uploader
QJYD React Image Uploader for Mobile
Install
npm install qj-mobile-uploader
Usage
import React from 'react';
import ReactDOM from 'react-dom';
import Uploader from 'qj-mobile-uploader'
import 'qj-mobile-uploader/index.css'
const element = document.getElementById('root');
ReactDOM.render(
<Uploader
uploadUrl={'/upload'}
max={9}
/>
, element);
API
Uploader
| Name | Type | Default | Description | | --------------- | ----------- | ----------------- | ----------------------------- | | prefixCls | string | 'qj-uploader' | prefixCls of this component | | compress | boolean | true | should compress image | | compressionRatio| number | 20 | number of compression ratio | | max | number | 9 | max image queue number | | maxSize | number | 10 * 1024 | max size of each image | | maxUploadSize | number | 3 | max number of uploading image number | | typeArray | array| ['jpeg', 'jpg', 'png', 'gif'] | array of support image type | | labelName | string | '上传图片' | name of label |