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
d36aa9bb
Commit
d36aa9bb
authored
Jan 10, 2022
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复首页路由匹配
parent
7278f663
Pipeline
#42236
passed with stages
in 1 minute 50 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
ExtendRightContent.js
src/components/GlobalHeader/ExtendRightContent.js
+5
-2
BasicLayout1.js
src/layouts/BasicLayout1.js
+8
-1
No files found.
src/components/GlobalHeader/ExtendRightContent.js
View file @
d36aa9bb
...
...
@@ -3,10 +3,10 @@ import { message } from 'antd';
import
_
,
{
words
}
from
'lodash'
;
import
{
connect
}
from
'react-redux'
;
import
{
withRouter
}
from
'react-router'
;
import
{
loadMicroApp
}
from
'qiankun'
;
import
{
useIntl
}
from
'@/locales/localeExports'
;
import
Icon
from
'@ant-design/icons'
;
import
{
setDefaultMountApp
}
from
'qiankun'
import
{
actionCreators
}
from
'../../containers/App/store'
;
import
HeaderSearch
from
'../HeaderSearch'
;
import
Avatar
from
'./AvatarDropdown'
;
...
...
@@ -126,6 +126,9 @@ const GlobalHeaderRight = props => {
?
props
.
global
.
get
(
'homepage'
)
:
props
.
global
.
get
(
'homepage.url'
);
window
.
share
.
event
.
emit
(
'goHome'
,
`/
${
url
}
`
);
// setDefaultMountApp()
// 1、window.globalConfig product
// 2. 拿到当前product
url
?
(
window
.
share
.
event
.
emit
(
'listenerMointer'
,
{
label
:
'首页'
,
...
...
src/layouts/BasicLayout1.js
View file @
d36aa9bb
...
...
@@ -352,13 +352,19 @@ const BasicLayout = props => {
// setChildrenRoutes(currentChildrenRoute)
window
.
share
.
event
.
on
(
'goHome'
,
url
=>
{
setChildrenRoutes
([
{
icon
:
<
HomeIcon
/>
,
path
:
url
,
name
:
'首页'
}
])
]);
setTabActiveKey
(
url
);
window
.
history
.
pushState
(
null
,
''
,
`/civbase
${
url
}
`
);
});
/**
* web4全屏退出,切换三级菜单高亮
...
...
@@ -435,6 +441,7 @@ const BasicLayout = props => {
}
const
handleSelectMenuItem
=
(
item
)
=>
{
debugger
setTabActiveKey
(
item
);
if
(
item
.
indexOf
(
'web_console'
)
===
-
1
)
{
window
.
history
.
pushState
(
null
,
''
,
`/civbase
${
item
}
`
);
...
...
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