毕设选题详情的附件列表

dev_cs_new
caishi 5 years ago
parent c61d9e81b1
commit cba575146d

@ -1,4 +1,5 @@
import React,{ Component } from "react";
import { ConditionToolTip } from 'educoder'
class AttachmentsList extends Component{
constructor(props){
@ -12,14 +13,18 @@ class AttachmentsList extends Component{
attachments.map((item,key)=>{
return(
<p key={key}>
<a className="color-grey">
<a className="color-grey fl">
<i className="font-14 color-green iconfont icon-fujian mr8"></i>
</a>
{
item.is_pdf && item.is_pdf == true ?
<a href={item.url} className="mr12" length="58" target="_blank">{item.title}</a>
<ConditionToolTip title={item.title} condition={item.title && item.title.length > 30 }>
<a href={item.url} className="mr12 fl task-hide" length="58" target="_blank" style={{"maxWidth":"432px"}}>{item.title}</a>
</ConditionToolTip>
:
<a href={item.url} className="mr12" length="58">{item.title}</a>
<ConditionToolTip title={item.title} condition={item.title && item.title.length > 30 }>
<a href={item.url} className="mr12 fl task-hide" length="58" style={{"maxWidth":"432px"}}>{item.title}</a>
</ConditionToolTip>
}
<span className="color-grey mt2 color-grey-6 font-12">{item.filesize}</span>
</p>

@ -6,7 +6,7 @@ import '../style.css'
import axios from "axios";
import GraduateTopicReply from './GraduateTopicReply'
import { ConditionToolTip,MarkdownToHtml } from 'educoder'
import { ConditionToolTip , MarkdownToHtml , AttachmentList } from 'educoder'
const $=window.$;
const type={1: "设计",2: "论文", 3: "创作"}
@ -60,9 +60,10 @@ class GraduateTopicDetailTable extends Component{
{
topicInfo && topicInfo.attachment_list.length>0 &&
<p className="mt30">
{
{/* {
topicInfo.attachment_list.map((item,key)=>{
return(
<li className="clearfix mb8" key={key}>
<i className="iconfont icon-fujian color-green font-16 mr8 fl"></i>
<ConditionToolTip title={item.title} condition={item.title && item.title.length > 30 }>
@ -72,7 +73,8 @@ class GraduateTopicDetailTable extends Component{
</li>
)
})
}
} */}
<AttachmentList {...this.props} {...this.state} attachments = {topicInfo.attachment_list}></AttachmentList>
</p>
}
</div>

Loading…
Cancel
Save