fix: 修复单次上传文件限制

--bug=1049382 --user=刘瑞斌 【应用编排】文件上传,单词上传最多文件数没限制住 https://www.tapd.cn/57709429/s/1615405
This commit is contained in:
CaptainB 2024-11-22 15:23:11 +08:00
parent 91633b58b8
commit cfb8e837ff

View File

@ -213,6 +213,7 @@ const uploadFile = async (file: any, fileList: any) => {
const file_limit_once = uploadImageList.value.length + uploadDocumentList.value.length
if (file_limit_once >= maxFiles) {
MsgWarning('最多上传' + maxFiles + '个文件')
fileList.splice(0, fileList.length)
return
}
if (fileList.filter((f: any) => f.size > fileLimit * 1024 * 1024).length > 0) {