feat: uploadCover

This commit is contained in:
2025-08-25 08:56:44 +08:00
parent aaea9ee6ed
commit 1e158e111c
3 changed files with 30 additions and 15 deletions

View File

@@ -33,9 +33,9 @@ export default function UploadFromWx(props: UploadFromWxProps) {
id: (Date.now() + count++).toString(),
}))
const onFileUploaded = uploadApi.batchUpload(files)
onAdd(res.tempFiles.map(item => ({
id: Date.now().toString(),
url: item.path,
onAdd(files.map(item => ({
id: item.id,
url: item.filePath,
})), onFileUploaded) // TODO: add loading state
})
}