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 } } componentWillReceiveProps(nextProps){ this.setState({ editable: nextProps.editable }) } render() { return
{ this.props.subtitle &&
{ this.props.tabs ?
{this.props.subtitle}
{this.props.tabs.map(item => ( this.props.subItemChange(item)}>{item.title} ))}
:
{this.props.subtitle}
}
}
{this.props.btns} { this.props.showOperateBtn && this.state.editable && this.props.selectedTab != 1 && } {this.props.customOperate}
} }