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

🐛 [使用 EditableProTable可编辑列表使用ProFormUploadButton 进行文件图片上传图片上传到后台但是在列表中没有展示] #11170

Open
Xyk859852 opened this issue Feb 27, 2024 · 1 comment

Comments

@Xyk859852
Copy link

🐛 bug 描述

📷 复现步骤 | Recurrence steps

{
title: '图片',
dataIndex: 'image',
valueType: 'image',
width: '15%',
renderFormItem: (_, { record, onChange }) => (
<ProFormUploadButton
name="image"
label="上传图片"
fieldProps={{
fileList: [],
onChange: (info) => {
console.log(info);
if (info.file.status === 'done') {
onChange(info.file.response.url);
}
},
action: '', // 设置你的上传接口 URL
}}
value={record.image}
/>
),
}

🏞 期望结果 | Expected results

希望可以直接在可编辑列表中进行查看到图片,status可以变成done

© 版本信息

  • Ant Design Pro 版本: ant-design-pro master 版本
  • umi 版本
  • 浏览器环境 Chrome
  • 开发环境 [Windows10]

🚑 其他信息

@AmberSanyu
Copy link

你自己定义了fileList为空,代码里又没看到你把值赋进去,肯定是空的啊,看看文档吧

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

2 participants