king
2021-01-07 0da0262bc236cfce928429fc4c48e1666eab3402
src/views/menudesign/index.jsx
@@ -109,16 +109,23 @@
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
  }
  updateComponentStyle = (item) => {
  updateComponentStyle = (parentId, keys, style) => {
    const { config } = this.state
    if (config.uuid !== item.uuid) return
    if (config.uuid !== parentId) return
    let components = config.components.map(item => {
      if (keys.includes(item.uuid)) {
        item.style = {...item.style, ...style}
      }
      return item
    })
    this.setState({
      config: {...config, components: []}
    }, () => {
      this.setState({
        config: {...config, components: item.components}
        config: {...config, components: components}
      })
    })
  }