king
2022-04-01 1ea9fe09a611dea3a05131e349a8e8dd46adcf6a
src/menu/modalconfig/index.jsx
@@ -66,6 +66,7 @@
  componentDidMount () {
    MKEmitter.addListener('completeSave', this.completeSave)
    MKEmitter.addListener('submitStyle', this.getStyle)
  }
  /**
@@ -76,6 +77,7 @@
      return
    }
    MKEmitter.removeListener('completeSave', this.completeSave)
    MKEmitter.removeListener('submitStyle', this.getStyle)
  }
  /**
@@ -207,6 +209,24 @@
    })
  }
  getStyle = (comIds, style) => {
    const { config } = this.state
    if (comIds[0] !== 'form') return
    let Index = config.fields.findIndex(n => n.uuid === comIds[1])
    if (Index === -1) return
    let _config = fromJS(config).toJS()
    _config.fields[Index].style = style
    this.setState({
      config: _config
    })
  }
  /**
   * @description 编辑后提交
   * 1、获取编辑后的表单信息
@@ -224,6 +244,9 @@
        }
        if (item.uuid === res.uuid) {
          if (item.style) {
            res.style = item.style
          }
          return res
        } else {
          return item