37 lines
1.5 KiB
JavaScript
37 lines
1.5 KiB
JavaScript
import {Row, Col, Icon} from 'antd';
|
|
import './index.less'
|
|
|
|
class PrjShowGroup extends React.Component {
|
|
constructor(props) {
|
|
super(props);
|
|
this.state = {
|
|
showGroup: props.showGroup ? props.showGroup : true
|
|
}
|
|
}
|
|
|
|
render() {
|
|
const {title,leftComponent=[],rightComponent=[], children,btnspace} = this.props;
|
|
const {showGroup} = this.state;
|
|
return (
|
|
<div className={`${this.props.className || ''}`}>
|
|
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@svo88k`} className="prj-exchange-title">
|
|
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@zn1jyp`} span="20" className="prj-exchange-title-left">
|
|
<div>{leftComponent}</div>
|
|
</Col>
|
|
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@l9px6l`} span="4" className="prj-exchange-title-right" >
|
|
<span style={{marginRight:"10px"}}>{rightComponent}</span>
|
|
<i className={showGroup ? 'icon-coms-up' : 'icon-coms-down'} onClick={()=>this.setState({showGroup:!showGroup})}/>
|
|
</Col>
|
|
</Row>
|
|
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@mr443s`} className="prj-exchange-content" style={{display:showGroup ? "block":"none"} }>
|
|
{
|
|
children
|
|
}
|
|
</Row>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
}
|
|
|
|
export default PrjShowGroup |