diff --git a/web_src/vuepages/langs/config/zh-CN.js b/web_src/vuepages/langs/config/zh-CN.js index 4698c67e0..88c953faf 100644 --- a/web_src/vuepages/langs/config/zh-CN.js +++ b/web_src/vuepages/langs/config/zh-CN.js @@ -221,7 +221,7 @@ const zh = { uploadStatus: '上传状态', modelFileUploadDefaultTips: '点击添加文件或直接拖拽文件到此处', modelFileUploadErrTips: '单次最多上传10个文件,模型总文件大小不超过{size}G', - modelFileNameTips: '文件名长度不超过128字符', + modelFileNameTips: '文件名长度不超过128个字符', fileIstoBig: '文件太大', removeFile: '移除文件', uploadSuccess: '上传成功', diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-2.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-2.vue index e154152b3..1e034fa2b 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-2.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-2.vue @@ -189,10 +189,10 @@ export default { this.showUploadErr = false; } }, - checkFiles(file) { + checkFiles(file, countStay) { const fileList = this.dropzoneHandler.getAcceptedFiles(); const filesSize = fileList.reduce((acc, item, index) => acc + item.size, 0) + (file ? file.size : 0); - const filesCount = fileList.length + (file ? 1 : 0); + const filesCount = fileList.length + (file && !countStay ? 1 : 0); const allfilesSize = filesSize + this.state.size; if (file && filesCount > maxFileSize) { this.dropzoneHandler.removeFile(file); @@ -494,7 +494,7 @@ export default { const fileList = this.dropzoneHandler.getAcceptedFiles(); if (!fileList.length) return; for (let i = 0, iLen = fileList.length; i < iLen; i++) { - if (!this.checkFiles(fileList[i])) return; + if (!this.checkFiles(fileList[i], true)) return; } this.resetFileStatus(); this.uploadFiles = fileList;