From 316c1eaecf02b1ba5d7fc8120fd8b1379f5ad927 Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 6 Apr 2021 11:17:41 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-50664=20=20=E3=80=90=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E3=80=91body=E8=AE=BE=E7=BD=AE=E7=BB=9D=E5=AF=B9?= =?UTF-8?q?=E5=B8=83=E5=B1=80=EF=BC=8C=E7=BB=84=E4=BB=B6=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E5=AF=BC=E8=88=AA=E5=90=8E=EF=BC=8C=E8=BF=98?= =?UTF-8?q?=E8=83=BD=E8=AE=BE=E7=BD=AE=E7=BB=84=E4=BB=B6=E5=86=BB=E7=BB=93?= =?UTF-8?q?=EF=BC=8C=E4=B8=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 表单绝对布局下的组件结构和自适应布局下的组件结构不同,导致不能获取到body下的直接子组件名称, 从而无法获取启用了快速定位导航的组件,在移动端冻结设置面板看来就像是当前表单没有任何组件启用了 快速定位导航,所以没能在冻结组件列表中将相关组件排除出去. 【改动思路】 根据表单绝对布局的组件结构进行特殊处理,以获取Body布局组件. --- .../component/MobileComponentFrozenPane.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java index 0dd2fcc154..a06cb1cd07 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java @@ -14,6 +14,8 @@ import com.fr.design.widget.FRWidgetFactory; import com.fr.form.main.Form; import com.fr.form.ui.FormWidgetHelper; import com.fr.form.ui.Widget; +import com.fr.form.ui.container.WBodyLayoutType; +import com.fr.form.ui.container.WFitLayout; import com.fr.form.ui.container.WLayout; import com.fr.form.ui.container.WSortLayout; import com.fr.form.ui.widget.CRBoundsWidget; @@ -123,9 +125,7 @@ public class MobileComponentFrozenPane extends BasicPane { } private List frozenWidgets() { - Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget(); - WLayout container = form.getContainer(); - WSortLayout wSortLayout = (WSortLayout) container.getWidget(container.getWidgetCount() - 1); + WSortLayout wSortLayout = getBodyWSortLayout(); List list = wSortLayout.getNonContainerWidgetList(); List widgets = new ArrayList<>(); for (String value : list) { @@ -137,6 +137,18 @@ public class MobileComponentFrozenPane extends BasicPane { return widgets; } + private WSortLayout getBodyWSortLayout() { + Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget(); + WLayout container = form.getContainer(); + WFitLayout wFitLayout = (WFitLayout) container.getWidget(container.getWidgetCount() - 1); + WSortLayout wSortLayout = wFitLayout; + if (wFitLayout.getBodyLayoutType() == WBodyLayoutType.ABSOLUTE) { + CRBoundsWidget boundsWidget = (CRBoundsWidget) wFitLayout.getWidget(0); + wSortLayout = (WSortLayout) boundsWidget.getWidget(); + } + return wSortLayout; + } + @Override protected String title4PopupWindow() { return "ComponentFrozenPane";