king
7 天以前 a1e9b18a4dbfd21e1bf4d5cb60974ac2f0115efd
src/tabviews/zshare/mutilform/mkInput/index.jsx
@@ -78,22 +78,6 @@
      } else {
        this.props.onChange(_val, true)
      }
    } else if (type === 'reset') {
      let _val = this.props.config.initval
      if (this.state.encryption === 'true' && _val) {
        try {
          _val = window.decodeURIComponent(window.atob(_val))
        } catch (e) {
          _val = this.props.config.initval
        }
      }
      this.setState({value: _val}, () => {
        this.inputRef.current.select()
      })
      this.props.onChange(this.props.config.initval)
    }
  }
@@ -101,7 +85,9 @@
    let val = e.target.value
    let submit = /\n/g.test(val)
    val = val.replace(/\n/g, '')
    if (submit) {
      val = val.replace(/\n|'/g, '')
    }
    if (submit && /^\s+$/.test(val)) {
      submit = false
@@ -139,7 +125,7 @@
      MKEmitter.emit('mkFC', 'focus', config.tabUuid)
    } else {
      MKEmitter.emit('mkFC', 'focus', config.tabUuid)
      this.props.onSubmit()
      this.props.onSubmit(config.tabUuid, config.errTabUuid)
    }
  }