From 01078cf7cac7902cbbf658c60ec63994333ad212 Mon Sep 17 00:00:00 2001 From: lijing1 Date: Fri, 27 Mar 2026 09:18:39 +0800 Subject: [PATCH] update --- src/components/common/addFile/index.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/common/addFile/index.vue b/src/components/common/addFile/index.vue index a7c64970..768c3f6a 100644 --- a/src/components/common/addFile/index.vue +++ b/src/components/common/addFile/index.vue @@ -26,6 +26,7 @@ import Dialog from '@/components/common/dialog/index.vue'; import TableForm from '@/components/common/table/tableForm.vue'; import { uploadBigFile } from '@/utils/file'; import emitter from '@/utils/eventBus'; +import { ElMessage } from 'element-plus'; const emit = defineEmits(['finished']); @@ -79,6 +80,10 @@ watch( ); const addFileFun = (file: any) => { + if (file.size <= 0) { + ElMessage.warning('大小为0的文件已被过滤'); + return false; + } formData.value.files.push(file); formData.value.fileTypeDictValue = props.fileType; formData.value.disciplineDictValue = props.discipline;