@winman-f2e/image-upload
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

图片上传组件

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
}

Readme

Keywords

none

Package Sidebar

Install

npm i @winman-f2e/image-upload

Weekly Downloads

0

Version

1.0.3

License

none

Unpacked Size

33.2 kB

Total Files

17

Last publish

Collaborators

  • luofeiyue
  • whiskeyi
  • yousy
  • guoyeeg
  • azgaga
  • liushichuan
  • yaochen
  • shenyuan
  • aflyermin
  • ignous
  • jeekdong