|
|
|
@@ -2769,6 +2769,7 @@ $(document).ready(async () => { |
|
|
|
dictInvalidFileType: $dropzone.data('invalid-input-type'), |
|
|
|
dictFileTooBig: $dropzone.data('file-too-big'), |
|
|
|
dictRemoveFile: $dropzone.data('remove-file'), |
|
|
|
dictMaxFilesExceeded:'上次超过限制', |
|
|
|
init() { |
|
|
|
this.on('success', (file, data) => { |
|
|
|
filenameDict[file.name] = data.uuid; |
|
|
|
@@ -2788,6 +2789,21 @@ $(document).ready(async () => { |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
this.on('addedfile',(file)=>{ |
|
|
|
console.log("addfile",file,filenameDict,this.files.length) |
|
|
|
if(file.size/(1000*1000)>3){ |
|
|
|
this.removeFile(file) |
|
|
|
$('.maxfilesize.ui.red.message').text('单次最多上传XX个文件,每个文件不超过XXM。') |
|
|
|
$('.maxfilesize.ui.red.message').css('display','block') |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
this.on('maxfilesexceeded',(file)=>{ |
|
|
|
this.removeFile(file) |
|
|
|
$('.maxfilesize.ui.red.message').text('一次最多只能上传 5 个文件, 上传已达到上限,请勿再添加文件。') |
|
|
|
$('.maxfilesize.ui.red.message').css('display','block') |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|