@winman-f2e/image-upload
v1.0.3
Published
Demo:
Downloads
4
Keywords
Readme
图片上传组件
Demo:
import React from 'react';
import { ImageUpload } from '@winman-f2e/image-upload';
export default () => <ImageUpload hint="lele" />;
api
interface Props {
hint?: string; // 额外的描述文字,比如'限制width:xxx,height:xxx'
value?: string;
onChange?: (value: string) => void;
accept?: string;
prefix?: boolean; // 接口请求的前缀,newbackend可以传false
beforeUpload?: (file: File) => void; // 图片上传前的事件,返回 boolean
}