Skip to content
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

imageUpload选择多张图片上传显示异常 #4364

Closed
seven-spac opened this issue Nov 11, 2021 · 10 comments
Closed

imageUpload选择多张图片上传显示异常 #4364

seven-spac opened this issue Nov 11, 2021 · 10 comments

Comments

@seven-spac
Copy link

Version of antd-mobile

5.0.0-beta.23

Description

imageUpload设置为多张图片上传时,第一次上传若干张,第二次再上传之后超出数量限制的图片仍然会显示

@p697
Copy link
Collaborator

p697 commented Nov 11, 2021

这里没有成功复现,请问可以提供一下你的代码片段吗?

@seven-spac
Copy link
Author

export default function () {
const maxCount = 10;
const [fileList, setFileList] = useState([
{
url: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
},
]);

async function mockUpload(file) {
console.log(file);
dealImageCompression(file, { quality: 0.5 }, function (newFile) {
let formData = new FormData();
formData.append("file", newFile, file.name);
// 上传
uploadUrl(formData).then(
(res) => {},
(res) => {}
);
});

return {
  url: URL.createObjectURL(file),
};

}
return (
<ImageUploader
value={fileList}
onChange={setFileList}
upload={mockUpload}
maxCount={10}
multiple
showUpload={fileList.length < maxCount}
>
<div
style={{
width: 80,
height: 80,
borderRadius: 40,
backgroundColor: "#f5f5f5",
display: "flex",
justifyContent: "center",
alignItems: "center",
color: "#999999",
}}
>
<PictureOutline style={{ fontSize: 32 }} />


);
}

@p697
Copy link
Collaborator

p697 commented Nov 12, 2021

还是没有复现成功😿

根据你的描述 第一次上传若干张,第二次再上传之后超出数量限制的图片仍然会显示 ,我的理解是这样:

在设置 multiple=truemaxCount=10 的情况下,若第一次上传5张,第二次上传6张,此时会显示11张图片。但我并没有复现成功,请问可以再描述的具体一些吗?

@awmleer
Copy link
Member

awmleer commented Nov 12, 2021

@seven-spac 升级到 beta.25 试试看?你现在似乎是用的 beta.23?
image

@seven-spac
Copy link
Author

好的,我再试一下,谢谢了

@NARUTOyuyang
Copy link

ImageUploader 在 android 中点击上传没反应,有遇到过么

@seven-spac
Copy link
Author

seven-spac commented Dec 15, 2021 via email

@NARUTOyuyang
Copy link

在目前所引用的项目里还没有遇到过,android和ios系统均正常

------------------ 原始邮件 ------------------ 发件人: "ant-design/ant-design-mobile" @.>; 发送时间: 2021年12月15日(星期三) 晚上6:00 @.>; 抄送: "Jacqueline、 me @.@.>; 主题: Re: [ant-design/ant-design-mobile] imageUpload选择多张图片上传显示异常 (Issue #4364) ImageUploader 在 android 中点击上传没反应,有遇到过么 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

你是在 android app 是使用,还在在手机浏览器中使用

@seven-spac
Copy link
Author

seven-spac commented Dec 16, 2021 via email

@xiaoming12138
Copy link

是在app里使用的
……
------------------ 原始邮件 ------------------ 发件人: "ant-design/ant-design-mobile" @.>; 发送时间: 2021年12月16日(星期四) 中午11:11 @.>; 抄送: "Jacqueline、 me @.@.>; 主题: Re: [ant-design/ant-design-mobile] imageUpload选择多张图片上传显示异常 (Issue #4364) 在目前所引用的项目里还没有遇到过,android和ios系统均正常 … ------------------ 原始邮件 ------------------ 发件人: "ant-design/ant-design-mobile" @.>; 发送时间: 2021年12月15日(星期三) 晚上6:00 @.>; 抄送: "Jacqueline、 me @.@.>; 主题: Re: [ant-design/ant-design-mobile] imageUpload选择多张图片上传显示异常 (Issue #4364) ImageUploader 在 android 中点击上传没反应,有遇到过么 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. 你是在 android app 是使用,还在在手机浏览器中使用 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

在安卓的微信浏览器里的h5项目,多选上传没反应,单选上传可以

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants