fix(web): chat file delete bugfix

This commit is contained in:
zhaoying
2026-03-06 19:44:34 +08:00
parent 22382423ad
commit 865ad31f2f
2 changed files with 12 additions and 6 deletions

View File

@@ -50,7 +50,11 @@ const ChatInput: FC<ChatInputProps> = ({
const handleDelete = (file: any) => {
fileChange?.(fileList?.filter(item => file.url ? item.url !== file.url : item.uid !== file.uid) || [])
fileChange?.(fileList?.filter(item => {
return item.thumbUrl && file.thumbUrl ? item.thumbUrl !== file.thumbUrl
: item.url && file.url ? item.url !== file.url
: item.uid !== file.uid
}) || [])
}
// Convert file object to preview URL
const previewFileList = useMemo(() => {