1.0.1 • Published 8 months ago

rb-files-crop v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

rb-files-crop

文件上传编辑容器(上传前图片裁剪、文件重命名等),目前仅用于 Ant Design Upload 组件

npm npm type definitions

安装

npm i rb-files-crop

使用

import { Upload } from 'antd';
import FilesCrop from 'rb-files-crop';

const Demo = () => (
  <FilesCrop>
    <Upload>+ Add image</Upload>
  </FilesCrop>
);

Props

属性类型默认说明
editModalTitlestring编辑文件编辑弹窗标题
editModalWidthnumber | string55vm编辑弹窗宽度,px 的数值或百分比
editModalClassNamestring-为 Modal 容器提供您自己的类名
beforeEditfunction-弹窗打开前调用
previewIconsPreviewIcons-编辑列表预览图标
onModalOKfunction-编辑弹窗确认操作
onModalCancelfunction-点击弹窗遮罩层、右上角叉、取消的关闭操作
onUploadFailfunction-上传失败时的回调

PreviewIcons

属性类型默认说明
picturestring-编辑列表图片图标
wordstring-编辑列表word图标
excelstring-编辑列表excel图标
txtstring-编辑列表txt图标
pdfstring-编辑列表pdf图标
pptstring-编辑列表ppt图标
rarstring-编辑列表rar图标
zipstring-编辑列表zip图标
othersstring-编辑列表除上述外其它文件图标