From 15464721ddc9191a36a9c79d2ca1400c5aade0bb Mon Sep 17 00:00:00 2001 From: thinkgem Date: Fri, 15 Oct 2021 20:21:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AD=90=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=AA=8C=E8=AF=81=E7=B1=BB=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gen/include/formChildTableScript.html | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/core/src/main/resources/templates/modules/gen/include/formChildTableScript.html b/modules/core/src/main/resources/templates/modules/gen/include/formChildTableScript.html index 96486085..6be7045a 100644 --- a/modules/core/src/main/resources/templates/modules/gen/include/formChildTableScript.html +++ b/modules/core/src/main/resources/templates/modules/gen/include/formChildTableScript.html @@ -38,14 +38,18 @@ for (c in child.columnList){ } // 生成控件样式 var cssClass = ''; - if (c.isNull != '1'){ + if (c.isRequired == '1'){ cssClass = cssClass + ' required'; } - if (c.attrType == 'Long' || c.attrType == 'Integer'){ - cssClass = cssClass + ' digits'; - } - if (c.attrType == 'Double'){ - cssClass = cssClass + ' number'; + var fieldValid = c.optionMap['fieldValid']; + if (isNotEmpty(fieldValid)){ + if (type.name(fieldValid) == 'String[]'){ + for (var fv in fieldValid){ + cssClass = cssClass + ' ' + fv; + } + }else if(isNotBlank(fieldValid)){ + cssClass = cssClass + ' ' + fieldValid; + } } // 输出列字段 if(c.showType == 'input'){