king
2021-10-21 1da6506bf58270bacc2a4345002c6b082835580e
src/tabviews/zshare/mutilform/mkInput/index.jsx
@@ -53,6 +53,9 @@
    if (!/\n/ig.test(val)) {
      this.props.onChange(val)
      this.setState({value: val})
      if (!val) {
        this.inputRef.current.focus()
      }
    } else {
      val = val.replace(/\n/ig, '')
@@ -70,6 +73,7 @@
    if (config.enter === 'tab') {
      MKEmitter.emit('mkFC', 'focus', config.tabUuid)
    } else {
      MKEmitter.emit('mkFC', 'focus', config.tabUuid)
      this.props.onSubmit()
    }
  }
@@ -78,7 +82,7 @@
    const { config } = this.props
    const { value } = this.state
    return <Input ref={this.inputRef} placeholder={config.placeholder || ''} value={value} autoComplete="off" disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleInputSubmit} />
    return <Input ref={this.inputRef} className="mk-form-input" allowClear placeholder={config.placeholder || ''} value={value} autoComplete="off" disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleInputSubmit} />
  }
}