Add Attachment4

This commit is contained in:
sylor_huang@126.com 2020-09-25 11:00:17 +08:00
parent d228d7bcbf
commit c6eb67404a
1 changed files with 33 additions and 30 deletions

View File

@ -50,7 +50,10 @@ class Attachment extends Component {
if (result) {
this.setState({
show_video: status === "preview",
video_url: status === "preview" ? "https://forgeplus.trustie.net" + result.data.url : undefined,
video_url:
status === "preview"
? "https://forgeplus.trustie.net" + result.data.url
: undefined,
move_spin: false,
});
} else {
@ -119,8 +122,8 @@ class Attachment extends Component {
}}
className="pd510 attachment-list-div"
>
{this.is_video(item.title) ? (
<Spin spinning={move_spin}>
<Spin spinning={move_spin}>
{this.is_video(item.title) ? (
<a
onClick={() => this.show_video_modal(item)}
className="attachment-list-a"
@ -129,34 +132,34 @@ class Attachment extends Component {
<span>{item.title}</span>
<span className="ml20">{item.filesize}</span>
</a>
</Spin>
) : (
<Link
to={`${item.url}`}
target="_blank"
className="attachment-list-a"
>
<i className="iconfont icon-fujian mr8 paper-clip-color font-12"></i>
<span>{item.title}</span>
<span className="ml20">{item.filesize}</span>
</Link>
)}
) : (
<Link
to={`${item.url}`}
target="_blank"
className="attachment-list-a"
>
<i className="iconfont icon-fujian mr8 paper-clip-color font-12"></i>
<span>{item.title}</span>
<span className="ml20">{item.filesize}</span>
</Link>
)}
{canDelete ? (
<Popconfirm
placement="bottom"
title={"您确定要删除附件吗"}
okText="是"
cancelText="否"
onConfirm={() => this.deleteAttachment(item.id)}
>
<span className="attachment-list-delete fr">
<i className="iconfont icon-lajitong mr10 color-grey-9 font-14"></i>
</span>
</Popconfirm>
) : (
""
)}
{canDelete ? (
<Popconfirm
placement="bottom"
title={"您确定要删除附件吗"}
okText="是"
cancelText="否"
onConfirm={() => this.deleteAttachment(item.id)}
>
<span className="attachment-list-delete fr">
<i className="iconfont icon-lajitong mr10 color-grey-9 font-14"></i>
</span>
</Popconfirm>
) : (
""
)}
</Spin>
</div>
);
})}