king
2024-05-22 4f29ad0f9800313ea239064a1b5aab663a794674
src/templates/modalconfig/index.jsx
@@ -14,7 +14,6 @@
import asyncComponent from '@/utils/asyncComponent'
import { BaseConfig, SearchItems } from './source'
import { updateForm } from '@/utils/utils-update.js'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const { Panel } = Collapse
@@ -124,7 +123,7 @@
  componentDidMount() {
    window.GLOB.formId = ''
    MKEmitter.addListener('submitStyle', this.getStyle)
    document.onkeydown = (event) => {
      let e = event || window.event
      let keyCode = e.keyCode || e.which || e.charCode
@@ -157,7 +156,6 @@
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    MKEmitter.removeListener('submitStyle', this.getStyle)
    this.setState = () => {
      return
    }
@@ -184,24 +182,6 @@
    }
    this.props.handleView(param)
  }
  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
    })
  }
  /**