el upload accept
时间: 2023-10-28 13:02:36 浏览: 44
引用:<el-upload action="''" multiple :http-request="imgUpload" list-type="picture-card" :ref="$upload" accept=".jpg, .jpeg, .png, .gif, .bmp, .JPG, .JPEG, .PBG, .GIF, .BMP" :limit="8" :file-list="mItem.imageUrls" :on-remove="handleRemove" :on-exceed="handleExceed" :before-upload="beforeUpload" @submit="submitList" :before-remove="(file, fileList)=>beforeRemove(file, fileList,index,mIndex)"> <span><i class="el-icon-plus" style="font-size:14px;"></i> 添加图片</span> </el-upload> 。 引用:项目需求是多个文件上传,在一次请求中...el-upload accept=.xlsx ref=upload multiple :limit=5 action=http://xxx.xxx.xxx/personality/uploadExcel :on-preview=handlePreview :on-change=handleChange :o。
根据引用和引用的内容,el-upload的accept属性用于指定上传文件时允许的文件类型。在引用中,accept属性的值为".jpg, .jpeg, .png, .gif, .bmp, .JPG, .JPEG, .PBG, .GIF, .BMP",表示只接受这些后缀名的图片文件。而在引用中,accept属性的值为".xlsx",表示只接受后缀名为.xlsx的文件。通过设置accept属性,可以限制用户只能上传指定类型的文件。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)