html:

<div class="layui-upload">
<button type="button" class="layui-btn layui-btn-normal" >
</div>

js:

//多文件自动上传
var demoListView = $('#demoList')
, uploadListIns = upload.render({
elem: '#testList'
, url: 'UploadKeepImg'
, accept: 'jpg|png'
, multiple: true
, number: 2
, auto: true
, before: function (obj) {
var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
obj.preview(function (index, file, result) {
var tr = $(['<tr >上传失败</span>');
tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示重传
}
});

参考文章:

https://fly.layui.com/jie/26134/

https://www.cnblogs.com/zhaopanpan/articles/9927548.html

相关文章:

  • 2021-04-10
  • 2022-12-23
  • 2021-08-18
  • 2022-12-23
  • 2022-01-09
  • 2022-01-10
  • 2022-01-20
  • 2022-12-23
猜你喜欢
  • 2021-04-30
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2021-10-20
相关资源
相似解决方案