NewbieUploader

上传组件

Version: 1.0.0

Props

Prop nameDescriptionTypeValuesDefault
valueobject|array|string-() => ({})
name上传文件字段名string-"file"
headers设置上传的请求头部,IE10 以上有效object-{}
accept接受上传的文件类型, 详见 input accept Attributeopen in new windowstring-""
type上传列表的内建样式,支持三种基本样式 text, picture 和 picture-cardstringtext, picture, picture-card"picture-card"
disabled是否禁用boolean-false
maxSize单个文件大小上限,单位为 MBnumber-20
maxNum上传文件个数上限number-1
multiple是否支持多选文件boolean-false
multipart是否使用分块上传boolean-false
action上传文件的服务器地址string-""
extraData上传时的附加参数object-{}
uploadText上传按钮文本string-"上传"
uploadProps原生 Uploaderopen in new window 配置object-{}

Events

Event namePropertiesDescription
update:value
successfileList Array - 文件列表上传成功时触发

示例


图片上传

上传

文件上传

Last Updated:
Contributors: sinceow