diff --git a/client/packages/lowcoder/src/app.tsx b/client/packages/lowcoder/src/app.tsx index 3779019d2..e51f526dc 100644 --- a/client/packages/lowcoder/src/app.tsx +++ b/client/packages/lowcoder/src/app.tsx @@ -142,8 +142,9 @@ class AppIndex extends React.Component { /> )} - + , - layout: , + layout: , outAppLayout: , }; diff --git a/client/packages/lowcoder/src/comps/comps/rootComp.tsx b/client/packages/lowcoder/src/comps/comps/rootComp.tsx index 59359af43..cc65f7342 100644 --- a/client/packages/lowcoder/src/comps/comps/rootComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/rootComp.tsx @@ -31,6 +31,7 @@ import { } from "lowcoder-design"; import RefTreeComp from "./refTreeComp"; import { ExternalEditorContext } from "util/context/ExternalEditorContext"; +import { useUserViewMode } from "util/hooks"; const EditorView = lazy( () => import("pages/editor/editorView"), @@ -60,6 +61,7 @@ function RootView(props: RootViewProps) { const [editorState, setEditorState] = useState(); const [propertySectionState, setPropertySectionState] = useState({}); const { readOnly } = useContext(ExternalEditorContext); + const isUserViewMode = useUserViewMode(); const appThemeId = comp.children.settings.getView().themeId; const { orgCommonSettings } = getGlobalSettings(); const themeList = orgCommonSettings?.themeList || []; @@ -109,7 +111,7 @@ function RootView(props: RootViewProps) { }; }, [editorState, propertySectionState]); - if (!editorState && readOnly) { + if (!editorState && !isUserViewMode && readOnly) { return ; } @@ -127,7 +129,7 @@ function RootView(props: RootViewProps) { {Object.keys(comp.children.queries.children).map((key) => (
{comp.children.queries.children[key].getView()}
))} - + diff --git a/client/packages/lowcoder/src/pages/editor/editorView.tsx b/client/packages/lowcoder/src/pages/editor/editorView.tsx index bde656267..82594cc68 100644 --- a/client/packages/lowcoder/src/pages/editor/editorView.tsx +++ b/client/packages/lowcoder/src/pages/editor/editorView.tsx @@ -393,15 +393,17 @@ function EditorView(props: EditorViewProps) { ]} - {!hideBodyHeader && } - - - {uiComp.getView()} - -
- {hookCompViews} -
-
+ }> + {!hideBodyHeader && } + + + {uiComp.getView()} + +
+ {hookCompViews} +
+
+
); }