From 1fdbf5de543b33c4ecc3066e3e8c197efd6766c3 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Fri, 1 Mar 2024 15:58:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=8A=E4=BC=A0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/dataset/component/UploadComponent.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/src/views/dataset/component/UploadComponent.vue b/ui/src/views/dataset/component/UploadComponent.vue index ba69ec67a..bff2e60da 100644 --- a/ui/src/views/dataset/component/UploadComponent.vue +++ b/ui/src/views/dataset/component/UploadComponent.vue @@ -17,6 +17,8 @@ :auto-upload="false" :show-file-list="false" accept=".txt, .md" + limit="50" + :on-exceed="onExceed" >
@@ -77,6 +79,9 @@ function deleteFlie(index: number) { form.value.fileList.splice(index, 1) } +const onExceed = () => { + MsgError('每次最多上传50个文件') +} /* 表单校验 */ @@ -86,6 +91,7 @@ function validate() { return valid }) } + onMounted(() => { if (documentsFiles.value) { form.value.fileList = documentsFiles.value