feat: helpMessage插槽

This commit is contained in:
dap
2025-03-29 16:13:48 +08:00
parent ffcc21975e
commit b78b599a06
5 changed files with 62 additions and 53 deletions

View File

@@ -75,13 +75,17 @@ function handlePreview(file: UploadFile) {
<FileUpload :disabled="true" :max-count="3" :help-message="false" />
</Card>
<Card title="文件夹上传" size="small">
<Card title="文件夹上传/自定义helpMessage" size="small">
<FileUpload
v-model:value="multipleFileId"
:max-count="3"
:directory="true"
accept="*"
/>
>
<template #helpMessage="slotProps">
<div>自定义helpMessage: {{ JSON.stringify(slotProps) }}</div>
</template>
</FileUpload>
当前绑定值: {{ multipleFileId }}
</Card>
</div>