| | |
| | | class NormalHeader extends Component { |
| | | static propTpyes = { |
| | | BID: PropTypes.any, // 上级主键值 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | config: PropTypes.object, // 配置信息 |
| | | refresh: PropTypes.func // 条件刷新 |
| | | } |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { config, menuType, BID } = this.props |
| | | const { config, BID } = this.props |
| | | const { title, show } = this.state |
| | | |
| | | if (!title && !show) return null |
| | |
| | | return ( |
| | | <div className={'normal-header' + (show ? ' header-search' : '')} style={config.headerStyle}> |
| | | <span className="title">{title}</span> |
| | | {show ? <SearchComponent config={config} BID={BID} menuType={menuType} refreshdata={this.props.refresh}/> : null} |
| | | {show ? <SearchComponent config={config} BID={BID} refreshdata={this.props.refresh}/> : null} |
| | | </div> |
| | | ) |
| | | } |