Browse Source

REPORT-50664 【移动端】body设置绝对布局,组件设置侧边导航后,还能设置组件冻结,为bug

【问题原因】
表单绝对布局下的组件结构和自适应布局下的组件结构不同,导致不能获取到body下的直接子组件名称,
从而无法获取启用了快速定位导航的组件,在移动端冻结设置面板看来就像是当前表单没有任何组件启用了
快速定位导航,所以没能在冻结组件列表中将相关组件排除出去.

【改动思路】
根据表单绝对布局的组件结构进行特殊处理,以获取Body布局组件.
zheng-1641779399395
Starryi 4 years ago
parent
commit
316c1eaecf
  1. 18
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java

18
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<String> frozenWidgets() {
Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget();
WLayout container = form.getContainer();
WSortLayout wSortLayout = (WSortLayout) container.getWidget(container.getWidgetCount() - 1);
WSortLayout wSortLayout = getBodyWSortLayout();
List<String> list = wSortLayout.getNonContainerWidgetList();
List<String> 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";

Loading…
Cancel
Save