Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
ebee6a80
Commit
ebee6a80
authored
Mar 14, 2024
by
杨思琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理首页为base功能
parent
33bc366c
Pipeline
#86023
passed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
19 deletions
+20
-19
micro.js
src/micro.js
+20
-19
No files found.
src/micro.js
View file @
ebee6a80
...
...
@@ -205,26 +205,27 @@ export const application = global => {
export
const
initSaveMicroApps
=
(
pathName
=
''
,
global
)
=>
{
/* eslint-disable */
event
.
emit
(
'loading'
,
false
);
setTimeout
(()
=>
{
const
microApps
=
application
(
global
);
const
micro
=
microApps
.
filter
(
app
=>
!
/civweb4/
.
test
(
app
.
name
))
??
[];
if
(
/civweb4/
.
test
(
pathName
)
&&
!
web4Load
)
{
event
.
emit
(
"initweb"
,
true
);
loadMicroApps
(
micro
,
pathNam
e
);
web4Load
=
true
;
}
else
{
const
target
=
micorManager
.
slice
(
-
1
)[
0
]
??
null
;
if
(
!
target
||
pathName
.
indexOf
(
target
.
name
)
==
-
1
)
{
const
microApp
=
microApps
.
filter
(
app
=>
pathName
.
indexOf
(
app
.
name
)
>
-
1
)[
0
]
??
null
;
if
(
microApp
)
micorManager
.
push
({
...
loadMicroApp
(
microApp
,
Configuration
,
LifeCycle
),
name
:
microApp
?.
name
,
store
:
microApp
?.
props
?.
store
})
}
event
.
emit
(
'loading'
,
false
);
setTimeout
(()
=>
{
const
microApps
=
application
(
global
);
pathName
.
indexOf
(
'civbase/civ_base'
)
>
-
1
&&
event
.
emit
(
'loading'
,
false
)
const
micro
=
microApps
.
filter
(
app
=>
!
/civweb4/
.
test
(
app
.
name
))
??
[];
if
(
/civweb4/
.
test
(
pathName
)
&&
!
web4Load
)
{
event
.
emit
(
"initweb"
,
tru
e
);
loadMicroApps
(
micro
,
pathName
)
;
web4Load
=
true
;
}
else
{
const
target
=
micorManager
.
slice
(
-
1
)[
0
]
??
null
;
if
(
!
target
||
pathName
.
indexOf
(
target
.
name
)
==
-
1
)
{
const
microApp
=
microApps
.
filter
(
app
=>
pathName
.
indexOf
(
app
.
name
)
>
-
1
)[
0
]
??
null
;
if
(
microApp
)
micorManager
.
push
({
...
loadMicroApp
(
microApp
,
Configuration
,
LifeCycle
)
,
name
:
microApp
?.
name
,
store
:
microApp
?.
props
?.
store
}
)
}
})
}
})
};
export
const
loadMicroApps
=
(
apps
,
pathName
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment