From b8b31ddd640c4f3fe994970f850a3255769a4ef0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 04 一月 2022 23:24:30 +0800
Subject: [PATCH] 2022-01-04

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 2adf417..c21546b 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -328,14 +328,23 @@
         loading: true,
         check: !this.state.check
       }, () => {
+        let type = 'text'
+        let fieldlen = 50
+        let value = this.state.check ? btn.openVal : btn.closeVal
+
+        if (typeof(value) === 'number') {
+          type = 'number'
+          fieldlen = 0
+        }
+        
         let item = {
-          type: 'text',
+          type: type,
           readonly: false,
           readin: true,
           writein: true,
-          fieldlen: 50,
+          fieldlen: fieldlen,
           key: btn.field,
-          value: this.state.check ? btn.openVal : btn.closeVal
+          value: value
         }
         this.execSubmit(data, () => { this.setState({loading: false})}, [item])
       })

--
Gitblit v1.8.0