Skip to content

FastUpload

基于el-upload封装的一个上传控件, 为了简化上传组件的开发。

属性

属性说明类型默认值
listType取值:picture-card或text,前者呈现为图片,后者呈现为附件Stringtext
multiple是否支持多文件, 默认只能传一个文件Booleanfalse
limit当multiple为true时,此值限制文件数量(必配置)Number1
action上传地址路径String/
disabled是否禁用Booleanfalse
on-preview预览时Function<(file, {row, column, $index}) => void>-
before-remove移除前Function<(file, files, {row, column, $index}) => void>-
on-remove移除前Function<(file, files, {row, column, $index}) => void>-
response-handler上传成功后、组件接收前对数据二次处理Function<(response, file, files, {row, column, $index}) => String>-
on-success上传成功后, 组件处理完毕后Function<(response, file, files, {row, column, $index}) => void>-
on-progress上传时Function<(event, file, files, {row, column, $index}) => void>-
on-change文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用Function<(event, file, files, {row, column, $index}) => void>-
on-exceed当超出限制时,执行的钩子函数Function<(file, files, {row, column, $index}) => void>-