king
2021-10-14 dddb2c96f42d9c852dba26ff9a27daa12bd85008
src/menu/components/share/normalheader/index.jsx
@@ -18,6 +18,10 @@
    updateComponent: PropTypes.func  // 配置更新
  }
  state = {
    appType: sessionStorage.getItem('appType')
  }
  componentDidMount () {
    MKEmitter.addListener('submitStyle', this.getStyle)
  }
@@ -49,14 +53,21 @@
  changeStyle = () => {
    const { config } = this.props
    // MKEmitter.emit('changeStyle', [config.uuid, 'header'], ['font', 'height', 'border'], config.headerStyle)
    MKEmitter.emit('changeStyle', [config.uuid, 'header'], ['font', 'border'], config.headerStyle)
  }
  render() {
    const { config, defaultshow, hideSearch } = this.props
    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 (defaultshow === 'hidden') {
      if (!title && (!config.search || config.search.length === 0)) {
        show = false