From 040b0841d9b8bb62dd71c7a5832721071a21f63b Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 13 Sep 2021 09:51:59 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-59143=20=E3=80=90=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E9=80=82=E9=85=8D=E3=80=91=E6=A8=A1=E7=89=88=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=BA=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E4=B9=9F=E8=A6=81=E6=94=AF=E6=8C=81=E6=96=B0=E6=97=A7=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/fit/common/TemplateTool.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java b/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java index b8954d5f7e..ae1e98f885 100644 --- a/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java +++ b/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java @@ -46,11 +46,8 @@ public class TemplateTool { if (AdaptiveSwitchUtil.isSwitchJFromIng()) { currentType = DesignerUIModeConfig.getInstance().newUIMode() ? JFormType.NEW_TYPE : JFormType.OLD_TYPE; } else { - if (jTemplate instanceof NewJForm) { - NewJForm newJForm = (NewJForm) jTemplate; - if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) { - currentType = JFormType.NEW_TYPE; - } + if (isNewJForm(jTemplate)) { + currentType = JFormType.NEW_TYPE; } } //UI转换 @@ -62,6 +59,16 @@ public class TemplateTool { } }; + private static boolean isNewJForm(JTemplate jTemplate) { + if (jTemplate instanceof NewJForm) { + NewJForm newJForm = (NewJForm) jTemplate; + if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) { + return true; + } + } + return false; + } + public static Listener getSwitchListener() { return switchListener; }