vue中使用input[type="file"]实现文件上传功能

作者:袖梨 2022-06-25

注意:input[type="file"] 标签中的属性accept="application/msword,application/pdf" 在pc上正常,但是在手机ios和android上这个文件格式限制会被忽略,所以需要在js中增加格式的判断,以及对应显示样式的设置.(我也是刚发现,如果有遇到这个问题的可以参考下---下面有更改:)

```

Apply Online

Customer Car Manager

  • {{form.nameMsg}}

  • {{form.emailMsg}}

  • {{form.mobileMsg}}

  • {{form.locationMsg}}

  • {{wordNumber}}

    {{form.joinReasonMsg}}

  • {{fileObj.name}}

    Attach Resume

    (Microsoft Word or PDF file is allowed (5MB))

    Upload file or drag and drop

  • Submit
Apply Online
Thank you for applying to this job!
OK
```

相关文章

精彩推荐