mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-12 12:23:08 +08:00
use file.url after thumbUrl
This commit is contained in:
parent
c2cb6ea1b1
commit
6f42cceb4a
@ -54,11 +54,11 @@ export default React.createClass({
|
|||||||
let icon = <Icon type="paper-clip" />;
|
let icon = <Icon type="paper-clip" />;
|
||||||
|
|
||||||
if (this.props.listType === 'picture') {
|
if (this.props.listType === 'picture') {
|
||||||
icon = (file.status === 'uploading' || !file.thumbUrl)
|
icon = (file.status === 'uploading' || (!file.thumbUrl && !file.url))
|
||||||
? <Icon className={prefixCls + '-list-item-thumbnail'} type="picture" />
|
? <Icon className={prefixCls + '-list-item-thumbnail'} type="picture" />
|
||||||
: <a className={prefixCls + '-list-item-thumbnail'}
|
: <a className={prefixCls + '-list-item-thumbnail'}
|
||||||
href={file.url}
|
href={file.url}
|
||||||
target="_blank"><img src={file.thumbUrl} alt={file.name} /></a>;
|
target="_blank"><img src={file.thumbUrl || file.url} alt={file.name} /></a>;
|
||||||
}
|
}
|
||||||
if (file.status === 'uploading') {
|
if (file.status === 'uploading') {
|
||||||
progress = <div className={prefixCls + '-list-item-progress'}>
|
progress = <div className={prefixCls + '-list-item-progress'}>
|
||||||
|
Loading…
Reference in New Issue
Block a user