From a1e9b18a4dbfd21e1bf4d5cb60974ac2f0115efd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 30 五月 2025 15:18:44 +0800
Subject: [PATCH] 2025-05-30

---
 src/tabviews/zshare/mutilform/mkInput/index.jsx |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/zshare/mutilform/mkInput/index.jsx b/src/tabviews/zshare/mutilform/mkInput/index.jsx
index f147110..0083264 100644
--- a/src/tabviews/zshare/mutilform/mkInput/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkInput/index.jsx
@@ -83,9 +83,15 @@
 
   handleChange = (e) => {
     let val = e.target.value
-    let submit = /\n/ig.test(val)
+    let submit = /\n/g.test(val)
 
-    val = val.replace(/\n/ig, '')
+    if (submit) {
+      val = val.replace(/\n|'/g, '')
+    }
+
+    if (submit && /^\s+$/.test(val)) {
+      submit = false
+    }
 
     let _val = val
 
@@ -119,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)
     }
   }
 
@@ -127,6 +133,10 @@
     const { config } = this.props
     const { value } = this.state
 
+    if (config.inputType === 'password') {
+      return <Input.Password ref={this.inputRef} className="mk-form-input" 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} />
   }
 }

--
Gitblit v1.8.0