feat: enhance FileIcon and FileUpload components to support size prop and multi-file uploads, improving user experience and flexibility

This commit is contained in:
keven1024
2026-04-05 11:09:43 +08:00
parent d6c54de659
commit 3c031dcee9
4 changed files with 113 additions and 86 deletions

View File

@@ -28,9 +28,9 @@ useEventListener(document, 'paste', (evt: ClipboardEvent) => {
<template>
<FileUpload
@onChange="
(file) => {
(files) => {
// 这里没hash我们姑且认为name和size,type都一样的为同一个文件
setValue([...filterOutSameFile(value, [file]), file])
setValue([...filterOutSameFile(value, files), ...files])
}
"
v-slot="{ isOverDropZone }"