From f068c617b918fc7817c11724424cb1a9149ec3a2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 09 一月 2020 16:51:10 +0800
Subject: [PATCH] 2020-01-09

---
 src/templates/subtableconfig/actionform/index.jsx |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/templates/subtableconfig/actionform/index.jsx b/src/templates/subtableconfig/actionform/index.jsx
index 4bc4b86..6f91fe3 100644
--- a/src/templates/subtableconfig/actionform/index.jsx
+++ b/src/templates/subtableconfig/actionform/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { Form, Row, Col, Input, Select, Icon, Radio, notification, Tooltip, InputNumber } from 'antd'
-import { btnIcons, btnClasses } from '@/utils/option.js'
+import { btnIcons, btnClasses, formRule } from '@/utils/option.js'
 import './index.scss'
 
 const { TextArea } = Input
@@ -297,13 +297,26 @@
         let _rules = []
         if (item.key === 'innerFunc') {
           let str = '^(' + item.fields.join('|') + ')'
-          let _patten = new RegExp(str + '[0-9a-zA-Z_]*$', 'g')
+          let _patten = new RegExp(str + formRule.func.innerPattern + '$', 'g')
           _rules = [{
             pattern: _patten,
-            message: '鍚嶇О鍙厑璁稿寘鍚暟瀛椼�佸瓧姣嶅拰涓嬪垝绾匡紝涓斾互鎸囧畾瀛楃寮�濮嬨��'
+            message: formRule.func.innerMessage
           }, {
-            max: 50,
-            message: '鍐呴儴鍑芥暟鍚嶇О涓嶈秴杩�50涓瓧绗︺��'
+            max: formRule.func.max,
+            message: formRule.func.maxMessage
+          }]
+        } else if (item.key === 'outerFunc' || item.key === 'callbackFunc') {
+          _rules = [{
+            pattern: formRule.func.pattern,
+            message: formRule.func.message
+          }, {
+            max: formRule.func.max,
+            message: formRule.func.maxMessage
+          }]
+        } else {
+          _rules = [{
+            max: formRule.input.max,
+            message: formRule.input.message
           }]
         }
         fields.push(

--
Gitblit v1.8.0