element UI upload组件上传附件格式限制

<el-upload
   :action="uploadUrl"
   ref="upload"
   :multiple="false"
   :on-change="fileChange"
   :before-upload="beforeUpload"
   :on-success="handleAvatarSuccess"
   :on-preview="file_click"
   class="upload-demo"
   list-type="text"
   accept=".jpg,.jpeg,.png,.gif,.bmp,.pdf,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
   :file-list="uploadForm.personFileList"
   :auto-upload="false">
   <el-button size="small" type="primary">选择文件</el-button>
        <div slot="tip" class="el-upload__tip"><i class="el-icon-warning" style="color:red;margin-right:5px"></i>单个文件不超过5MB</div>
 </el-upload>

accept=".jpg,.jpeg,.png,.gif,.bmp,.pdf,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
//accept支持上传文件格式

 

element UI upload组件上传附件格式限制

上一篇:bobojavascript、asp.net 实现随机生成验证码


下一篇:HTML练习—开班信息