解决原生input框上传图片只能上传一次的bug
文章目录
将type="file"改为type="text"接着再次还原成type="file",
相当于做了一次清空
handleInputUpload(id) {
let ele= document.getElementById(id);
ele["type"] = "text";
ele["type"] = "file";
}
将type="file"改为type="text"接着再次还原成type="file",
相当于做了一次清空
handleInputUpload(id) {
let ele= document.getElementById(id);
ele["type"] = "text";
ele["type"] = "file";
}
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论