From fc241324087e605b145e8bbcc4ee3aece61dbf14 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 21 三月 2022 15:59:45 +0800
Subject: [PATCH] 2022-03-21

---
 src/templates/zshare/editTable/index.jsx |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/templates/zshare/editTable/index.jsx b/src/templates/zshare/editTable/index.jsx
index b1408c8..ef0ff17 100644
--- a/src/templates/zshare/editTable/index.jsx
+++ b/src/templates/zshare/editTable/index.jsx
@@ -134,7 +134,7 @@
 
   renderCell = (form) => {
     const { getFieldDecorator } = form
-    const { editing, dataIndex, title, record, children, className, required, inputType } = this.props
+    const { editing, dataIndex, title, record, children, className, required, inputType, rules } = this.props
 
     return (
       <td className={className}>
@@ -145,7 +145,8 @@
                 {
                   required: required,
                   message: ['number', 'text', 'input'].includes(inputType) ? `${eTDict['form.required.input']} ${title}!` : `${eTDict['form.required.select']} ${title}!`,
-                }
+                },
+                ...rules
               ],
               initialValue: inputType === 'multiStr' ? (record[dataIndex] ? record[dataIndex].split(',') : []) : record[dataIndex],
             })(this.getInput(form))}
@@ -576,6 +577,7 @@
           inputType: col.inputType,
           dataIndex: col.dataIndex,
           options: col.options || [],
+          rules: col.rules || [],
           min: col.min || 0,
           max: col.max || 500,
           unlimit: col.unlimit,

--
Gitblit v1.8.0