|
|
|
@ -20,7 +20,8 @@ class Osshackathon extends Component {
|
|
|
|
|
hackathonedit:false,
|
|
|
|
|
Osshackathonmodeltype:false,
|
|
|
|
|
spinning:false,
|
|
|
|
|
opentitletype:true
|
|
|
|
|
opentitletype:true,
|
|
|
|
|
boxoffsetHeigh:0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -54,6 +55,7 @@ class Osshackathon extends Component {
|
|
|
|
|
spinning:true
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -67,9 +69,16 @@ class Osshackathon extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
componentDidUpdate = (prevProps) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
componentDidUpdate = (prevProps,prevState) => {
|
|
|
|
|
if(prevState.data!=this.state.data){
|
|
|
|
|
//防止陷入无限循环
|
|
|
|
|
let box=document.getElementById("Osshackathonfontlists");
|
|
|
|
|
if(box){
|
|
|
|
|
this.setState({
|
|
|
|
|
boxoffsetHeigh:box.offsetHeight
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PaginationTask=(pageNumber)=>{
|
|
|
|
@ -228,7 +237,6 @@ class Osshackathon extends Component {
|
|
|
|
|
render() {
|
|
|
|
|
let {page,data,hackathonedit,opentitletype}=this.state;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="newMain clearfix newMainybot">
|
|
|
|
|
<style>
|
|
|
|
@ -299,18 +307,18 @@ class Osshackathon extends Component {
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.Osshackathonfontlist{
|
|
|
|
|
height: 180px;
|
|
|
|
|
max-height: 180px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>:""}
|
|
|
|
|
{hackathonedit===true?"":<p className={"Osshackathonfontlist mb30"}>
|
|
|
|
|
{hackathonedit===true?"":<p className={"Osshackathonfontlist mb30"} id={"Osshackathonfontlists"}>
|
|
|
|
|
{data&&data.hackathon.description===null?"":<div className={"markdown-body"}
|
|
|
|
|
dangerouslySetInnerHTML={{__html: markdownToHTML(data&&data.hackathon.description).replace(/▁/g, "▁▁▁")}}></div>}
|
|
|
|
|
</p>}
|
|
|
|
|
|
|
|
|
|
{opentitletype===true?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont"}>展开阅读全文<Icon type="down" /></Divider>:""}
|
|
|
|
|
{opentitletype===true&&this.state.boxoffsetHeigh===180?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont"}>展开阅读全文<Icon type="down" /></Divider>:""}
|
|
|
|
|
|
|
|
|
|
{hackathonedit===true?<Osshackathonmd
|
|
|
|
|
getosshackathon={()=>this.getosshackathonlist()}
|
|
|
|
|