From 91d2405afa62d2a7d32c6777d41e0e137cbbba81 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 08 一月 2024 16:08:23 +0800
Subject: [PATCH] 2024-01-08

---
 src/menu/components/table/edit-table/columns/editColumn/index.jsx |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
index 1077a06..7458ba3 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -217,6 +217,21 @@
       }
     } else if (key === 'format' && value === 'percent') {
       this.props.form.setFieldsValue({postfix: '%'})
+    } else if (key === 'editType') {
+      let _options = this.getOptions()
+
+      this.setState({
+        formlist: this.state.formlist.map(item => {
+          if (item.key === 'enter' && item.options && item.options[item.options.length - 1].field === '$noActX') {
+            item.options[item.options.length - 1].disabled = value !== 'select'
+          }
+
+          item.initVal = this.record[item.key]
+          item.hidden = !_options.includes(item.key)
+
+          return item
+        })
+      })
     } else if (['editable', 'editType', 'resourceType', 'ctrlField', 'eval', 'Hide', 'IsSort'].includes(key)) {
       let _options = this.getOptions()
 
@@ -331,7 +346,7 @@
           getPopupContainer={() => document.getElementById('edit-table-column-winter')}
         >
           {options.map((option, i) =>
-            <Select.Option key={i} datatype={option.datatype || ''} label={option.label || ''} value={(option.value || option.field || option.MenuID)}>
+            <Select.Option key={i} disabled={option.disabled === true} datatype={option.datatype || ''} label={option.label || ''} value={(option.value || option.field || option.MenuID)}>
               {(option.text || option.label || option.MenuName)}
             </Select.Option>
           )}
@@ -521,6 +536,12 @@
           }
         }
 
+        if (values.type === 'text' && values.editable === 'true') {
+          if (values.editType !== 'select' && values.enter === '$noActX') {
+            values.enter = '$noAct'
+          }
+        }
+
         if (values.dataSource) {
           let pass = checkSQL(values.dataSource)
 

--
Gitblit v1.8.0