0.0.6 • Published 2 years ago

zt-drag-upload-button v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

ZtDragUploadButton

Install

npm i zt-drag-upload-button

Properties

字段类别介绍默认值必填
childrenReact.ReactNode_
classNamestringdom的classname_
styleCSSPropertiesdom的style_
countnumber允许上传最大文件数1
acceptstring同input的accept_
urlstring上传api地址_如果未填uploadMethod及onFileSelected则必填,否则不必填
beforeUpload(fileList: FileList) => boolean上传前回调_
onError(error: any) => void文件上传失败回调_
onChange(value: any) => void文件上传成功回调(count为1时value为string类型,否则为array类型)_
uploadMethod(file: File) => Promise自定义上传方法_
onFileSelected() => Promise自定义文件选择器及上传(传入该方法将覆盖url及uploadMethod)_
0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.1

2 years ago