| | |
| | | MKEmitter.addListener('delButtons', this.delButtons) |
| | | MKEmitter.addListener('copyButtons', this.copyButtons) |
| | | MKEmitter.addListener('changePopview', this.initPopview) |
| | | MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle) |
| | | } |
| | | |
| | | /** |
| | |
| | | MKEmitter.removeListener('delButtons', this.delButtons) |
| | | MKEmitter.removeListener('copyButtons', this.copyButtons) |
| | | MKEmitter.removeListener('changePopview', this.initPopview) |
| | | MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle) |
| | | } |
| | | |
| | | updateComponentStyle = (item) => { |
| | | const { config } = this.state |
| | | |
| | | if (config.uuid !== item.uuid) return |
| | | |
| | | this.setState({ |
| | | config: {...config, components: []} |
| | | }, () => { |
| | | this.setState({ |
| | | config: {...config, components: item.components} |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | delButtons = (items) => { |