layui单文件上传会重复上传怎么解决
在上传成功的done函数里加一句delete this.files[index]就可以解决这个问题了
, done: function (res, index, upload) {
alert(index);
layer.msg(‘添加失败!’);
//var files = upload.pushFile();
delete this.files[index]
//console.log(res)
}
参考链接地址https://fly.layui.com/jie/25804/
真的是找了半天才找到解决办法