Browse Source

REPORT-59143 【设计器适配】模版设置为移动端模版也要支持新旧表单切换

fix-lag
Henry.Wang 3 years ago
parent
commit
dafa536ba2
  1. 17
      designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java

17
designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java

@ -46,11 +46,8 @@ public class TemplateTool {
if (AdaptiveSwitchUtil.isSwitchJFromIng()) { if (AdaptiveSwitchUtil.isSwitchJFromIng()) {
currentType = DesignerUIModeConfig.getInstance().newUIMode() ? JFormType.NEW_TYPE : JFormType.OLD_TYPE; currentType = DesignerUIModeConfig.getInstance().newUIMode() ? JFormType.NEW_TYPE : JFormType.OLD_TYPE;
} else { } else {
if (jTemplate instanceof NewJForm) { if (isNewJForm(jTemplate)) {
NewJForm newJForm = (NewJForm) jTemplate; currentType = JFormType.NEW_TYPE;
if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) {
currentType = JFormType.NEW_TYPE;
}
} }
} }
//UI转换 //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<JTemplate> getSwitchListener() { public static Listener<JTemplate> getSwitchListener() {
return switchListener; return switchListener;
} }

Loading…
Cancel
Save