# ChoiceFile 选择文件
基础用法
显示代码
使用内置的文件类型
显示代码
Attributes
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
callback | 回调函数,选择完毕之后通过该函数获取选择的文件 | Function(File | File[]) | - | - |
acceptType | 文件类型,同 input[file] 的 accept 属性 | String | - | - |
multiple | 多选文件 | Boolean | - | false |
fileType | 内置的文件类型 | String | 见下表 | - |
FileType
名称 | 说明 | 对应的类型 |
---|---|---|
excel | Excel文件 | .xls,.xlsx |
vodVideo | 可用于点播上传的文件 | video/avi,.avi,application/x-shockwave-flash,.swf,.f4v,video/mpeg,.mpg,video/mp4,.mp4,video/x-flv,.flv,video/x-ms-wmv,.wmv,video/quicktime,.mov,video/3gpp,.3gp,.rmvb,video/x-matroska,.mkv,.asf,.264,.ts,.mts,.dat,.vob,audio/mpeg,.mp3,audio/x-wav,.wav,video/x-m4v,.m4v,video/webm,.webm,.mod,.aac |