File tree Expand file tree Collapse file tree 6 files changed +19
-3
lines changed Expand file tree Collapse file tree 6 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 2828 display : flex;
2929 pointer-events : none;
3030 flex-direction : column;
31+ top : 0 ;
32+ z-index : 10000 ;
3133 }
3234 # loading svg {
3335 animation : breath 1s linear infinite;
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import { ExternalEditorContext } from "util/context/ExternalEditorContext";
3434import { useUserViewMode } from "util/hooks" ;
3535import React from "react" ;
3636import { isEqual } from "lodash" ;
37+ import { LoadingBarHideTrigger } from "@lowcoder-ee/util/hideLoading" ;
3738
3839const EditorView = lazy (
3940 ( ) => import ( "pages/editor/editorView" ) ,
@@ -138,6 +139,7 @@ const RootView = React.memo((props: RootViewProps) => {
138139 < div key = { key } > { comp . children . queries . children [ key ] . getView ( ) } </ div >
139140 ) ) }
140141 < Suspense fallback = { ! readOnly || isUserViewMode ? SuspenseFallback : null } >
142+ < LoadingBarHideTrigger />
141143 < EditorView uiComp = { comp . children . ui } preloadComp = { comp . children . preload } />
142144 </ Suspense >
143145 </ EditorContext . Provider >
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import * as uuid from "uuid";
88import "regenerator-runtime/runtime" ;
99import { debug } from "loglevel" ;
1010import "./index.less" ;
11- import log from "loglevel" ;
1211import "antd-mobile/es/global" ;
1312import 'animate.css' ;
1413import { initTranslator as initTranslatorDesign } from "i18n/design" ;
@@ -25,7 +24,7 @@ if (!window.ResizeObserver) {
2524 window . ResizeObserver = ResizeObserver ;
2625}
2726
28- function hideLoading ( ) {
27+ export function hideLoading ( ) {
2928 // hide loading
3029 const node = document . getElementById ( "loading" ) ;
3130 if ( node ) {
@@ -49,6 +48,5 @@ initTranslatorDesign().then(() => {
4948 const bootstrap = await import ( "./bootstrap/view/app" ) . then ( module => module . bootstrap ) ;
5049 bootstrap ( ) ;
5150 }
52- hideLoading ( ) ;
5351 } )
5452} )
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ import AppEditor from "../editor/AppEditor";
6868import { set } from "lodash" ;
6969import { MultiIconDisplay } from "@lowcoder-ee/comps/comps/multiIconDisplay" ;
7070import { initTranslator as initTranslatorDesign } from "i18n/design" ;
71+ import { LoadingBarHideTrigger } from "@lowcoder-ee/util/hideLoading" ;
7172
7273const TabLabel = styled . div `
7374 font-weight: 500;
@@ -218,6 +219,7 @@ export default function ApplicationHome() {
218219
219220 return (
220221 < DivStyled >
222+ < LoadingBarHideTrigger />
221223 < Layout
222224 sections = { [
223225 {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { ProductLoading } from "components/ProductLoading";
1010import { fetchConfigAction } from "redux/reduxActions/configActions" ;
1111import { fetchUserAction } from "redux/reduxActions/userActions" ;
1212import _ from "lodash" ;
13+ import { LoadingBarHideTrigger } from "@lowcoder-ee/util/hideLoading" ;
1314
1415export default function UserAuth ( ) {
1516 const dispatch = useDispatch ( ) ;
@@ -49,6 +50,7 @@ export default function UserAuth() {
4950 fetchUserAfterAuthSuccess,
5051 } }
5152 >
53+ < LoadingBarHideTrigger />
5254 < Switch location = { location } >
5355 < Redirect exact from = { USER_AUTH_URL } to = { AUTH_LOGIN_URL } />
5456 { AuthRoutes . map ( ( route ) => (
Original file line number Diff line number Diff line change 1+ import { useEffect } from "react" ;
2+ import { hideLoading } from "@lowcoder-ee/index" ;
3+
4+ export const LoadingBarHideTrigger = function ( props : any ) {
5+ useEffect ( ( ) => {
6+ setTimeout ( ( ) => hideLoading ( ) , 300 ) ;
7+ } , [ ] ) ;
8+
9+ return < > </ >
10+ } ;
You can’t perform that action at this time.
0 commit comments