From f65e034e4de7f8ee70f6c79642c4749ea78befd0 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 1 Mar 2021 16:57:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-48415=20=E3=80=90FR-X=E3=80=91?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=AE=BE=E7=BD=AE=E4=B8=BA=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E6=A8=A1=E6=9D=BF=EF=BC=8C=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=88=87=E6=8D=A2=E6=96=B0=E7=89=88=EF=BC=8C?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=86=8D=E6=89=93=E5=BC=80=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=EF=BC=8C=E5=8F=88=E5=8F=98=E4=B8=BA=E8=80=81=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-form/src/main/java/com/fr/design/fit/NewJForm.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/fit/NewJForm.java b/designer-form/src/main/java/com/fr/design/fit/NewJForm.java index 4df8b4386..ad0ea91fb 100644 --- a/designer-form/src/main/java/com/fr/design/fit/NewJForm.java +++ b/designer-form/src/main/java/com/fr/design/fit/NewJForm.java @@ -274,6 +274,9 @@ public class NewJForm extends JForm { public UIButton[] createExtraButtons() { UIButton[] extraButtons = super.createExtraButtons(); + if (mobileForm()) { + return extraButtons; + } switchAction = new SwitchAction(); return ArrayUtils.addAll(extraButtons, new UIButton[]{switchAction.getToolBarButton()}); } From 8de03b58c4d94ca76e26cd7b23b5ba66d2624f58 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 2 Mar 2021 11:34:15 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/fit/NewJForm.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/fit/NewJForm.java b/designer-form/src/main/java/com/fr/design/fit/NewJForm.java index ad0ea91fb..b8d429ca9 100644 --- a/designer-form/src/main/java/com/fr/design/fit/NewJForm.java +++ b/designer-form/src/main/java/com/fr/design/fit/NewJForm.java @@ -274,13 +274,16 @@ public class NewJForm extends JForm { public UIButton[] createExtraButtons() { UIButton[] extraButtons = super.createExtraButtons(); - if (mobileForm()) { - return extraButtons; - } - switchAction = new SwitchAction(); - return ArrayUtils.addAll(extraButtons, new UIButton[]{switchAction.getToolBarButton()}); + return addAdaptiveSwitchButton(extraButtons); } + private UIButton[] addAdaptiveSwitchButton(UIButton[] extraButtons) { + switchAction = new SwitchAction(); + if (!mobileForm()) { + return ArrayUtils.addAll(extraButtons, new UIButton[]{switchAction.getToolBarButton()}); + } + return extraButtons; + } public boolean isNewJFrom() { return jFormType == null || jFormType.isNewType();