From c2453a20af4187fb0978631282266d9d2e2cba01 Mon Sep 17 00:00:00 2001 From: chenshihai Date: Mon, 14 Nov 2022 16:18:49 +0800 Subject: [PATCH] fix-bugs --- .../pages/modelmanage/local/modelmanage-local-create-2.vue | 5 +++++ 1 file changed, 5 insertions(+) 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 facd8f3e3..e154152b3 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 @@ -194,6 +194,11 @@ export default { const filesSize = fileList.reduce((acc, item, index) => acc + item.size, 0) + (file ? file.size : 0); const filesCount = fileList.length + (file ? 1 : 0); const allfilesSize = filesSize + this.state.size; + if (file && filesCount > maxFileSize) { + this.dropzoneHandler.removeFile(file); + this.showUploadErrInfo(true, this.getDefaultErrTxt()); + return false; + } if (filesCount > maxFileSize || allfilesSize > maxModelFilesSize) { this.showUploadErrInfo(true, this.getDefaultErrTxt()); return false;