king
2024-06-01 4cc738e535d1a20701d206e12cf9de8cc5a01170
src/tabviews/zshare/mutilform/mkSelect/index.jsx
@@ -79,12 +79,15 @@
    MKEmitter.removeListener('mkFC', this.mkFormFocus)
  }
  mkFormFocus = (type, uuid) => {
  mkFormFocus = (type, uuid, val, level) => {
    if (uuid !== this.props.config.uuid) return
    if (type !== 'focus') return
    if (type === 'focus') {
    let _div = document.getElementById(uuid)
    _div && _div.click && _div.click()
    } else if (type === 'input' && (!level || level < 10)) {
      let _level = level || 1
      this.selectChange(val, _level++)
    }
  }
  mkFormHandle = (uuid, parentId, level) => {
@@ -123,7 +126,7 @@
    }
  }
  selectChange = (val) => {
  selectChange = (val, level) => {
    const { config } = this.state
    let other = {}
@@ -132,7 +135,7 @@
      option && config.subFields.forEach((n, i) => {
        other[n.field] = option[n.field]
        setTimeout(() => {
          MKEmitter.emit('mkFC', 'input', n.uuid, option[n.field])
          MKEmitter.emit('mkFC', 'input', n.uuid, option[n.field], level)
        }, i * 5)
      })
    }
@@ -177,7 +180,7 @@
          value={value}
          dropdownMatchSelectWidth={config.dropdown !== 'false'}
          filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
          onSelect={this.selectChange}
          onSelect={(val) => this.selectChange(val)}
          onChange={(val) => val === undefined && this.selectChange('')}
          disabled={config.readonly}
        >