fix: rang drag problem & opt picture compress
This commit is contained in:
@@ -68,12 +68,12 @@ export default function UploadCover(props: UploadCoverProps) {
|
||||
setVisible(false)
|
||||
}, [value])
|
||||
|
||||
const onWxAdd = useCallback((images: CoverImageValue[], onFileUploaded: Promise<{ id: string, data: uploadFileResponseData }[]>) => {
|
||||
const onWxAdd = useCallback((images: CoverImageValue[], onFileUpdate: Promise<{ id: string, url: string }[]>) => {
|
||||
onAdd(images)
|
||||
onFileUploaded.then(res => {
|
||||
onFileUpdate.then(res => {
|
||||
onAdd(res.map(item => ({
|
||||
id: item.id,
|
||||
url: item.data.file_path,
|
||||
url: item.url,
|
||||
})))
|
||||
})
|
||||
}, [onAdd])
|
||||
|
||||
Reference in New Issue
Block a user