import React from "react"; import { Button } from "antd"; import { WeaReqTop } from "ecCom"; 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() { const { selectedTab, tabs, subtitle, customOperate, subItemChange } = this.props; return
} iconBgcolor="#F14A2D" buttons={(this.props.showOperateBtn && this.state.editable && this.props.selectedTab != 1) ? [ ] : !_.isEmpty(customOperate) ? customOperate: []} showDropIcon={false} dropMenuDatas={[]} tabDatas={tabs || []} selectedKey={String(selectedTab) || ""} onChange={ key => subItemChange(key) } />
; // 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} {/*
*/ } {/*
;*/ } } }