This commit is contained in:
BianLzhaoMin 2025-05-23 16:15:21 +08:00
parent 95f15a7387
commit 5cd3ec9b98
1 changed files with 6 additions and 5 deletions

View File

@ -97,11 +97,6 @@
// }); // });
layui.use('upload', function () { layui.use('upload', function () {
if (fileList.length === 3) {
layer.msg('最多只能上传3个文件')
return
}
var upload = layui.upload; var upload = layui.upload;
// 执行上传功能 // 执行上传功能
var uploadInst = upload.render({ var uploadInst = upload.render({
@ -134,6 +129,12 @@
type: 'GET', type: 'GET',
success: function (res) { success: function (res) {
fileList = res.obj fileList = res.obj
if (fileList.length === 3) {
$('#upload-btn').attr('disabled', true)
} else {
$('#upload-btn').attr('disabled', false)
}
if (res.obj && res.obj.length > 0) { if (res.obj && res.obj.length > 0) {
$('.password-book-list').empty() $('.password-book-list').empty()
res.obj.forEach(item => { res.obj.forEach(item => {