ant-design / ant-design

An enterprise-class UI design language and React UI library
https://ant.design
MIT License
92.44k stars 49.69k forks source link

[需求]upload组件支持对某一个文件报错 #1673

Closed ottomao closed 8 years ago

ottomao commented 8 years ago

我又来给upload组件添需求了.... 业务场景:用户上传了N张图片,后台人工审核标记某几张不合法,需要退回。这时候就需要标记出文件列表中某几张图片的校验状态(例如:加个红框)。

看upload组件现在不支持这种样式,我只能加一些样式,nth-child这样来手动标红.... 咱考虑下怎么搞比较合适?

afc163 commented 8 years ago

Upload 会把服务器回传的 file.status 打到每一项的 className 上,类似 ant-upload-list-item-${file.status}。你只需要给 file.status 标上业务含义的标记并定义对应的样式即可。

例子:http://codepen.io/anon/pen/oxVRQy?editors=0110

ottomao commented 8 years ago

碉堡了...!!

On Thu, May 12, 2016 at 9:39 PM, 偏右 notifications@github.com wrote:

Closed #1673 https://github.com/ant-design/ant-design/issues/1673.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/ant-design/ant-design/issues/1673#event-658594910

Mao Xiaofeng(茅晓锋) Profession: F2E Tel:(86) 15801916167 _Email:_ottomao@gmail.com SinaWeibo:@茅晓锋Otto http://www.weibo.com/ottomao _Blog:_ottomao.com

lock[bot] commented 6 years ago

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.