@@ -31,6 +31,7 @@ import {
31
31
} from "lowcoder-design" ;
32
32
import RefTreeComp from "./refTreeComp" ;
33
33
import { ExternalEditorContext } from "util/context/ExternalEditorContext" ;
34
+ import { useUserViewMode } from "util/hooks" ;
34
35
35
36
const EditorView = lazy (
36
37
( ) => import ( "pages/editor/editorView" ) ,
@@ -60,6 +61,7 @@ function RootView(props: RootViewProps) {
60
61
const [ editorState , setEditorState ] = useState < EditorState > ( ) ;
61
62
const [ propertySectionState , setPropertySectionState ] = useState < PropertySectionState > ( { } ) ;
62
63
const { readOnly } = useContext ( ExternalEditorContext ) ;
64
+ const isUserViewMode = useUserViewMode ( ) ;
63
65
const appThemeId = comp . children . settings . getView ( ) . themeId ;
64
66
const { orgCommonSettings } = getGlobalSettings ( ) ;
65
67
const themeList = orgCommonSettings ?. themeList || [ ] ;
@@ -109,7 +111,7 @@ function RootView(props: RootViewProps) {
109
111
} ;
110
112
} , [ editorState , propertySectionState ] ) ;
111
113
112
- if ( ! editorState && readOnly ) {
114
+ if ( ! editorState && ! isUserViewMode && readOnly ) {
113
115
return < ModuleLoading /> ;
114
116
}
115
117
@@ -127,7 +129,7 @@ function RootView(props: RootViewProps) {
127
129
{ Object . keys ( comp . children . queries . children ) . map ( ( key ) => (
128
130
< div key = { key } > { comp . children . queries . children [ key ] . getView ( ) } </ div >
129
131
) ) }
130
- < Suspense fallback = { ! readOnly && SuspenseFallback } >
132
+ < Suspense fallback = { ! readOnly || isUserViewMode ? SuspenseFallback : null } >
131
133
< EditorView uiComp = { comp . children . ui } preloadComp = { comp . children . preload } />
132
134
</ Suspense >
133
135
</ EditorContext . Provider >
0 commit comments