input type file 文件选择框设置为多选,获取选择的多图 电脑版发表于:2024/4/15 17:06 ### html ``` <input ref="inputImgFile" type="file" multiple="true" accept="image/*" @change="uploadimg"> ``` 核心代码就是`multiple="true" ` ### js ``` function uploadimg(event) { const files = event.target.files; console.log(files); } ```