From 2350100a3e039f9af137c01440d8d82cc28b39e4 Mon Sep 17 00:00:00 2001 From: xiong_cl <140612616@qq.com> Date: Mon, 22 Apr 2024 17:48:45 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=B7=BB=E5=8A=A0=E5=8F=91=E6=96=87?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E4=BF=A1=E6=81=AF=EF=BC=8C=E5=9C=A8=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=96=87=E4=BB=B6=E6=97=B6=E5=8F=AF=E8=BE=93=E5=85=A5?= =?UTF-8?q?=202=E3=80=81=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E5=90=8E=E6=B8=85=E7=A9=BA=E6=96=87=E4=BB=B6=E5=88=97?= =?UTF-8?q?=E8=A1=A8=203=E3=80=81=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=92=8C=E7=A7=BB=E9=99=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/common/layui/extend/uploader/uploader.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/shandan-common/src/main/resources/static/js/common/layui/extend/uploader/uploader.js b/shandan-common/src/main/resources/static/js/common/layui/extend/uploader/uploader.js index af0cd62..ab1b7cf 100644 --- a/shandan-common/src/main/resources/static/js/common/layui/extend/uploader/uploader.js +++ b/shandan-common/src/main/resources/static/js/common/layui/extend/uploader/uploader.js @@ -48,6 +48,7 @@ layui.extend({ 文件名称 + 发文编号 进度 文件大小 操作 @@ -63,6 +64,11 @@ layui.extend({
+ + ` let fileBoxE = options.fileBoxEle || fileBoxEle; $(fileBoxE).html(fileBox); @@ -137,16 +143,19 @@ layui.extend({ progress: file.id, status: 0, }); + option.fileQueued && option.fileQueued(file); }); // 一批文件被添加 upload.on('filesQueued', function (files) { that.reloadData(rowData); element.render('progress'); + option.filesQueued && option.filesQueued(files); }); //文件从队列移除触发 upload.on('fileDequeued', function (file) { + option.fileDequeued && option.fileDequeued(file); }); // 文件上传之前触发 @@ -194,6 +203,8 @@ layui.extend({ rowData = []; loading.closeAll(); let {interruptNum, queueNum, uploadFailNum} = upload.getStats(); + //上传成功后清楚上传文件列表 + that.reloadData(rowData); option.uploadFinished && option.uploadFinished(uploadFailNum === 0 && interruptNum === 0 && queueNum === 0); });