| | |
| | | appType: sessionStorage.getItem('appType') |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('submitStyle', this.getStyle) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props.config), fromJS(nextProps.config)) |
| | | } |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('submitStyle', this.getStyle) |
| | | } |
| | | |
| | | getStyle = (comIds, style) => { |
| | | const { config } = this.props |
| | | getStyle = (style) => { |
| | | if (!style.borderBottomWidth) { |
| | | style.borderBottomWidth = '0px' |
| | | } |
| | | |
| | | if (comIds[0] !== config.uuid || comIds[1] !== 'header') return |
| | | |
| | | let _config = {...config, headerStyle: style} |
| | | let _config = {...this.props.config, headerStyle: style} |
| | | |
| | | this.props.updateComponent(_config) |
| | | } |
| | |
| | | options.push('padding') |
| | | } |
| | | |
| | | MKEmitter.emit('changeStyle', [config.uuid, 'header'], options, config.headerStyle) |
| | | MKEmitter.emit('changeStyle', options, config.headerStyle, this.getStyle) |
| | | } |
| | | |
| | | render() { |