Browse Source

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

fix-lag
Henry.Wang 3 years ago
parent
commit
32584054c8
  1. 7
      designer-form/src/main/java/com/fr/design/fit/NewJForm.java
  2. 4
      designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java

7
designer-form/src/main/java/com/fr/design/fit/NewJForm.java

@ -73,8 +73,6 @@ public class NewJForm extends JForm {
* @date: 2020/9/13 23:23 * @date: 2020/9/13 23:23
*/ */
private void changePaneSize() { private void changePaneSize() {
if (mobileForm())
return;
NewFormMarkAttr newFormMarkAttr = this.getTarget().getAttrMark(NewFormMarkAttr.XML_TAG); NewFormMarkAttr newFormMarkAttr = this.getTarget().getAttrMark(NewFormMarkAttr.XML_TAG);
if (newFormMarkAttr.isNotSetOriginSize()) { if (newFormMarkAttr.isNotSetOriginSize()) {
newFormMarkAttr.setBodyHeight(LayoutTool.getBodyHeight(this)); newFormMarkAttr.setBodyHeight(LayoutTool.getBodyHeight(this));
@ -284,10 +282,7 @@ public class NewJForm extends JForm {
private UIButton[] addAdaptiveSwitchButton(UIButton[] extraButtons) { private UIButton[] addAdaptiveSwitchButton(UIButton[] extraButtons) {
switchAction = new SwitchAction(); switchAction = new SwitchAction();
if (!mobileForm()) { return ArrayUtils.addAll(extraButtons, new UIButton[]{switchAction.getToolBarButton()});
return ArrayUtils.addAll(extraButtons, new UIButton[]{switchAction.getToolBarButton()});
}
return extraButtons;
} }
public boolean isNewJFrom() { public boolean isNewJFrom() {

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

@ -48,9 +48,7 @@ public class TemplateTool {
} else { } else {
if (jTemplate instanceof NewJForm) { if (jTemplate instanceof NewJForm) {
NewJForm newJForm = (NewJForm) jTemplate; NewJForm newJForm = (NewJForm) jTemplate;
if (newJForm.mobileForm()) { if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) {
currentType = JFormType.OLD_TYPE;
} else if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) {
currentType = JFormType.NEW_TYPE; currentType = JFormType.NEW_TYPE;
} }
} }

Loading…
Cancel
Save