king
2022-08-19 3b103caa6bfc9ed410e67156c3ca1785bf1cecc9
src/menu/components/group/normal-group/index.jsx
@@ -60,7 +60,6 @@
  }
  componentDidMount () {
    MKEmitter.addListener('submitStyle', this.getStyle)
    MKEmitter.addListener('tabsChange', this.handleTabsChange)
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
  }
@@ -72,7 +71,6 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('submitStyle', this.getStyle)
    MKEmitter.removeListener('tabsChange', this.handleTabsChange)
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
  }
@@ -99,15 +97,11 @@
  changeStyle = () => {
    const { group } = this.state
    MKEmitter.emit('changeStyle', [group.uuid], ['background', 'border', 'padding', 'margin', 'shadow'], group.style)
    MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], group.style, this.getStyle)
  }
  getStyle = (comIds, style) => {
    const { group } = this.state
    if (comIds.length !== 1 || comIds[0] !== group.uuid) return
    let _card = {...group, style}
  getStyle = (style) => {
    let _card = {...this.state.group, style}
    this.setState({
      group: _card