Uploader
Install

Install


API

Props

nametypedefaultdescriptionrequired version
titlestring图片上传component title--
filesarray[]initial file data source, through event on-fileList-change bind v-model--
limitnumber
string
5limit upload image count--
limitPromptfunction(limit) => `不能上传超过${limit}张图片`prompt for limit alert--
capturenumber
string
falsewhether only invoke camera--
enableCompressbooleantruewhether enable compress--
maxWidthstring
number
1024image compress max width--
qualitystring
number
0.92image compress rate--
urlstringupload server url--
headersobject{}custom upload request headers--
withCredentialsbooleansetting as true, can support CORS set cookie--
paramsobjectcustom formData params--
namestringfileupload formData key, default as file--
autoUploadbooleantruewhether auto upload--
multiplestring
boolean
whether support multiple select image, false will not support--
readonlybooleanfalsefield readonly (hide add and delete button)--

Events

nameparamsdescriptionrequired version
@on-change(FileItem, FileList)emits when file change--
@on-cancel--emits when cancel select image--
@on-success(result, fileItem)emits when file upload success--
@on-error(xhr)emits when file upload failed--
@on-delete(cb)emits when delete file, the first params is a callback which can hide previewer--
@before-upload--emits before invoke xhr request--
@after-upload(action)emits after xhr request finished--


Contributors

Contributors

Total commits quantity: 1,Total contributors quantity: 1

Bobjoy