king
2022-08-02 8d66ff34fae5b048a6b7923cc75d34f13a08be9d
src/menu/components/share/normalheader/index.jsx
@@ -53,7 +53,7 @@
  changeStyle = () => {
    const { config } = this.props
    let options = ['font', 'border']
    let options = ['font', 'border', 'background']
    if (config.type === 'menubar') {
      options.push('padding')
    }
@@ -63,19 +63,24 @@
  render() {
    const { config, hideSearch } = this.props
    const { appType } = this.state
    // const { appType } = this.state
    let title = config.plot ? config.plot.title : config.wrap.title
    let show = true
    if (!title && appType === 'mob' && config.type === 'card' && config.subtype === 'datacard' && config.action && config.action.length) {
      title = ' '
    }
    // if (!title && appType === 'mob' && config.type === 'card' && config.subtype === 'datacard' && config.action && config.action.length) {
    //   title = ' '
    // }
    if (!title && (!config.search || config.search.length === 0 || hideSearch === 'true')) {
      show = false
    }
    let _style = resetStyle(config.headerStyle)
    let _s = {display: 'block', flex: 1}
    if (show && ((config.wrap && config.wrap.searchable === 'true') || (hideSearch !== 'true' && config.search && config.search.length))) {
      _s = null
    }
    return (
      <div className={'normal-header' + (!show ? ' hidden' : '') + (config.wrap && config.wrap.searchable === 'true' ? ' tree-search' : '')} style={_style}>
@@ -84,7 +89,7 @@
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
          </div>
        } trigger="hover">
          <span className="title">{title}</span>
          <span className="title" style={_s}>{title}</span>
        </Popover>
        {config.wrap && config.wrap.searchable === 'true' ? <span className="ant-input-search ant-input-affix-wrapper"><span className="ant-input-suffix"><SearchOutlined /></span></span> : null}
        {hideSearch !== 'true' && config.search ? <SearchComponent config={config} updatesearch={this.props.updateComponent}/> : null}