king
2024-04-29 50b49c1b760489c3430fc382656d57c5fbbab07c
src/menu/components/share/normalheader/index.jsx
@@ -36,11 +36,22 @@
  }
  getStyle = (style) => {
    if (!style.borderBottomWidth) {
      style.borderBottomWidth = '0px'
    let _style = fromJS(style).toJS()
    if (!_style.borderBottomWidth) {
      _style.borderBottomWidth = '0px'
    }
    if (_style.fontFamily) {
      if (_style.fontFamily.length === 0) {
        delete _style.fontFamily
      } else {
        _style.fontFamily = _style.fontFamily.join(',')
      }
    }
    if (_style.lineHeight === 2.8) {
      delete _style.lineHeight
    }
    let _config = {...this.props.config, headerStyle: style}
    let _config = {...this.props.config, headerStyle: _style}
    
    this.props.updateComponent(_config)
  }
@@ -48,9 +59,13 @@
  changeStyle = () => {
    const { config } = this.props
    let options = ['font', 'border', 'background', 'padding']
    let _style = config.headerStyle ? fromJS(config.headerStyle).toJS() : {}
    let options = ['font', 'border', 'background', 'padding', 'fontFamily']
    MKEmitter.emit('changeStyle', options, config.headerStyle, this.getStyle)
    _style.fontFamily = _style.fontFamily ? _style.fontFamily.split(',') : []
    _style.lineHeight = _style.lineHeight || 2.8
    MKEmitter.emit('changeStyle', options, _style, this.getStyle)
  }
  render() {