在对齐button的action中触发change事件来驱动更新state,如 <StyleButton iconClassName={''} key={''} active={'uf-align-justify' === blockType} label={''} onToggle={this.setAlign} style={'uf-align-justify'} /> ..................................................................... setAlign = (type) => { const { editorState } = this.props; this.props.onChange(RichUtils.toggleBlockType(editorState, type)); };
在对齐button的action中触发change事件来驱动更新state,如