diff --git a/designer-base/src/main/java/com/fr/design/mainframe/reuse/ComponentReuseNotificationInfo.java b/designer-base/src/main/java/com/fr/design/mainframe/reuse/ComponentReuseNotificationInfo.java index 5011ef2bd..46ccef099 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/reuse/ComponentReuseNotificationInfo.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/reuse/ComponentReuseNotificationInfo.java @@ -28,6 +28,8 @@ public class ComponentReuseNotificationInfo implements XMLable { private boolean widgetLibHasRefreshed = false; + private boolean completeFirstShowComponentLib = false; + public boolean isClickedWidgetLib() { return clickedWidgetLib; } @@ -68,6 +70,14 @@ public class ComponentReuseNotificationInfo implements XMLable { this.widgetLibHasRefreshed = widgetLibHasRefreshed; } + public boolean isCompleteFirstShowComponentLib() { + return completeFirstShowComponentLib; + } + + public void setCompleteFirstShowComponentLib(boolean completeFirstShowComponentLib) { + this.completeFirstShowComponentLib = completeFirstShowComponentLib; + } + public String getHistoryCreatedReuses() { return historyCreatedReuses; } @@ -79,7 +89,8 @@ public class ComponentReuseNotificationInfo implements XMLable { @Override public void readXML(XMLableReader reader) { this.setClickedWidgetLib(reader.getAttrAsBoolean("clickedWidgetLib", false)); - this.setCompleteEmbedFilter(reader.getAttrAsBoolean("hasCompleteEmbedFilter", false)); + this.setCompleteEmbedFilter(reader.getAttrAsBoolean("completeEmbedFilter", false)); + this.setCompleteFirstShowComponentLib(reader.getAttrAsBoolean("completeFirstShowComponentLib", false)); this.setWidgetLibHasRefreshed(reader.getAttrAsBoolean("widgetLibHasRefreshed", false)); this.setFirstDrag(reader.getAttrAsBoolean("firstDrag", true)); this.setHistoryCreatedReuses(reader.getAttrAsString("historyCreatedReuses", "[]")); @@ -90,7 +101,8 @@ public class ComponentReuseNotificationInfo implements XMLable { public void writeXML(XMLPrintWriter writer) { writer.startTAG("ComponentReuseNotificationInfo"); writer.attr("clickedWidgetLib", this.clickedWidgetLib) - .attr("hasCompleteEmbedFilter", this.completeEmbedFilter) + .attr("completeEmbedFilter", this.completeEmbedFilter) + .attr("completeFirstShowComponentLib", this.completeFirstShowComponentLib) .attr("firstDrag", this.firstDrag) .attr("widgetLibHasRefreshed", this.widgetLibHasRefreshed) .attr("firstDragEndTime", this.firstDragEndTime) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/share/ComponentShareUtil.java b/designer-base/src/main/java/com/fr/design/mainframe/share/ComponentShareUtil.java index 8940b6c89..db53be726 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/share/ComponentShareUtil.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/share/ComponentShareUtil.java @@ -48,7 +48,7 @@ public class ComponentShareUtil { } /** - * 判断是否需要展示嵌入式筛选面板 + * 判断是否在需要展示组件库界面 * * @return boolean */ @@ -56,6 +56,10 @@ public class ComponentShareUtil { return !ComponentReuseNotificationInfo.getInstance().isCompleteEmbedFilter() && !hasTouched() && isCurrentTplNewCreate(); } + public static boolean needShowComponentLib() { + return !ComponentReuseNotificationInfo.getInstance().isCompleteFirstShowComponentLib() && !hasTouched() && isCurrentTplNewCreate(); + } + /** * 判断是否需要展示首次拖拽动效 * diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 6d0147b60..6e16472df 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -13,6 +13,7 @@ import com.fr.base.theme.TemplateThemeConfig; import com.fr.base.vcs.DesignerMode; import com.fr.design.DesignModelAdapter; import com.fr.design.DesignState; +import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.FormMobileAttrAction; import com.fr.design.actions.TemplateParameterAction; @@ -49,6 +50,7 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.form.FormECCompositeProvider; import com.fr.design.mainframe.form.FormECDesignerProvider; +import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo; import com.fr.design.mainframe.share.collect.ComponentCollector; import com.fr.design.mainframe.share.ComponentShareUtil; import com.fr.design.mainframe.template.info.JFormProcessInfo; @@ -894,8 +896,10 @@ public class JForm extends JTemplate