-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImageUploader使用renderItem自定义渲染时,通过value绑定fileList,上传1个文件之后列表展示两个选项 #6044
Comments
加上onChange属性,再改变fileList可完美解决,onFileUpload中不需要setFileList |
为什么按照你说的,还是会多一个空白的选项 |
import React, { useState } from 'react'; const IndexView = (props) => {
}; export default IndexView; |
很玄学,应该是upload的方法要返回一个对象,我之前返回的直接是url字符串 |
为什么我的每次上传都会显示两个,一个上传成功的,一个blob类型的临时图片 |
|
也是这样 |
我这边需要对图片进行处理,上传成功获得短链接,显示得用短链接获取长链接显示 |
你先用本地测试,不考虑接口,完全copy代码,出来就是一张 |
,完全copy代码,确实显示一张,但加上接口就有问题了 |
怎么能不显示那个临时图片呢 |
那就是你处理上传之后的逻辑有问题了 |
export const Upload = (props: any) => { const onFileUpload = async (file: any) => { return ( |
Version of antd-mobile
5.28.1
Description
The text was updated successfully, but these errors were encountered: