diff --git a/ui/src/views/dataset/component/UploadComponent.vue b/ui/src/views/dataset/component/UploadComponent.vue index 45857ff67..53f2d8103 100644 --- a/ui/src/views/dataset/component/UploadComponent.vue +++ b/ui/src/views/dataset/component/UploadComponent.vue @@ -227,6 +227,11 @@ const fileHandleChange = (file: any, fileList: UploadFiles) => { fileList.splice(-1, 1) return false } + if (file?.size === 0) { + MsgError('文件不能为空') + fileList.splice(-1, 1) + return false + } } const onExceed = () => {