28 lines
846 B
JavaScript
28 lines
846 B
JavaScript
import React from 'react'
|
|
import { Button } from 'antd';
|
|
import "./index.less"
|
|
|
|
export default class SlideModalTitle extends React.Component {
|
|
componentWillMount() { // 初始化渲染页面
|
|
this.state = {
|
|
editable: this.props.editable === undefined ? "true": this.props.editable
|
|
}
|
|
}
|
|
render() {
|
|
return <div className="slideTitleWrapper">
|
|
<div className="iconWrapper">
|
|
<i className='icon-coms-meeting' />
|
|
</div>
|
|
<div className="slideTitle">
|
|
<div className="subtitle">{this.props.subtitle}</div>
|
|
</div>
|
|
<div className="btnWrapper">
|
|
{this.props.btns}
|
|
{
|
|
this.state.editable && <Button type="primary" className="saveBtn" onClick={this.props.onSave}>保存</Button>
|
|
}
|
|
</div>
|
|
|
|
</div>
|
|
}
|
|
} |