🐞 fix(ID1001475 上传附件后,再多次点击上传附件成功):

This commit is contained in:
czm 2023-03-08 11:46:07 +08:00
parent 58d5fd5747
commit 96192a67dd

View File

@ -77,10 +77,11 @@ const DeliveryDetail: FC = () => {
const handleUploadChange = (imageList: string[]) => { const handleUploadChange = (imageList: string[]) => {
console.log('imageList===>', imageList) console.log('imageList===>', imageList)
setReadyToUploadList(prev => [...prev, ...imageList]) setReadyToUploadList(prev => [...imageList])
} }
// 上传附件 // 上传附件
const handleUploadPic = useCallback(async() => { const handleUploadPic = useCallback(async() => {
console.log('readyToUploadList:::', readyToUploadList)
const res = await uploadData({ const res = await uploadData({
id: Number(router.params.id), id: Number(router.params.id),
delivery_appendix: readyToUploadList, delivery_appendix: readyToUploadList,