mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
parent
37cf2a3d5e
commit
dc191a321b
@ -100,23 +100,31 @@ export default class UploadList extends React.Component {
|
||||
file.url
|
||||
? (
|
||||
<a
|
||||
onClick={(e) => this.handlePreview(file, e)}
|
||||
href={file.url} target="_blank"
|
||||
href={file.url}
|
||||
target="_blank"
|
||||
className={`${prefixCls}-list-item-name`}
|
||||
onClick={e => this.handlePreview(file, e)}
|
||||
>
|
||||
{file.name}
|
||||
</a>
|
||||
) : <span className={`${prefixCls}-list-item-name`}>{file.name}</span>
|
||||
) : (
|
||||
<span
|
||||
className={`${prefixCls}-list-item-name`}
|
||||
onClick={e => this.handlePreview(file, e)}
|
||||
>
|
||||
{file.name}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
{
|
||||
this.props.listType === 'picture-card' && file.status !== 'uploading'
|
||||
? (
|
||||
<span>
|
||||
<a
|
||||
onClick={(e) => this.handlePreview(file, e)}
|
||||
href={file.url}
|
||||
target="_blank"
|
||||
style={{ pointerEvents: file.url ? '' : 'none' }}
|
||||
onClick={e => this.handlePreview(file, e)}
|
||||
>
|
||||
<Icon type="eye-o" />
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user