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
aa5771a9
Commit
aa5771a9
authored
3 years ago
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复三级菜单高亮选中
parent
ad67bb3d
Pipeline
#35942
passed with stages
in 31 minutes 5 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
global.less
src/global.less
+1
-0
BasicLayout1.js
src/layouts/BasicLayout1.js
+16
-7
No files found.
src/global.less
View file @
aa5771a9
...
...
@@ -4,6 +4,7 @@ html,
body,
#root {
height: 100%;
overflow: hidden;
}
* {
...
...
This diff is collapsed.
Click to expand it.
src/layouts/BasicLayout1.js
View file @
aa5771a9
...
...
@@ -53,7 +53,7 @@ const { TabPane } = Tabs;
const
{
layout
:
defaultSetting
}
=
require
(
'../../config/config'
);
// import Login from '../pages/user/login/login';
const
antIcon
=
<
LoadingOutlined
style
=
{{
fontSize
:
12
}}
spin
/>
;
/* eslint-disable */
const
homeSvg
=
()
=>
(
<
svg
t
=
"1631169883330"
className
=
"icon"
viewBox
=
"0 0 1024 1024"
version
=
"1.1"
xmlns
=
"http://www.w3.org/2000/svg"
p
-
id
=
"2203"
width
=
"20"
height
=
"20"
><
path
d
=
"M423.9 487H221.7c-34.9 0-63.4-28.4-63.4-63.4V221.5c0-34.9 28.4-63.4 63.4-63.4h202.2c34.9 0 63.4 28.4 63.4 63.4v202.2c-0.1 34.9-28.5 63.3-63.4 63.3z m0-63.3v31.7-31.7zM221.7 221.5v202.2h202.1l0.1-202.2H221.7zM803.1 487H600.9c-34.9 0-63.4-28.4-63.4-63.4V221.5c0-34.9 28.4-63.4 63.4-63.4h202.2c34.9 0 63.4 28.4 63.4 63.4v202.2c0 34.9-28.5 63.3-63.4 63.3z m0-63.3v31.7-31.7zM600.9 221.5v202.2H803l0.1-202.2H600.9zM423.9 865.8H221.7c-34.9 0-63.4-28.4-63.4-63.4V600.3c0-34.9 28.4-63.4 63.4-63.4h202.2c34.9 0 63.4 28.4 63.4 63.4v202.2c-0.1 34.9-28.5 63.3-63.4 63.3z m0-63.3v31.7-31.7zM221.7 600.3v202.2h202.1l0.1-202.2H221.7zM736.9 865.8h-69.7c-71.4 0-129.6-58.1-129.6-129.6v-69.7c0-71.4 58.1-129.6 129.6-129.6h69.7c71.4 0 129.6 58.1 129.6 129.6v69.7c0 71.5-58.2 129.6-129.6 129.6z m-69.8-265.5c-36.5 0-66.2 29.7-66.2 66.2v69.7c0 36.5 29.7 66.2 66.2 66.2h69.7c36.5 0 66.2-29.7 66.2-66.2v-69.7c0-36.5-29.7-66.2-66.2-66.2h-69.7z"
fill
=
"#B2B2B2"
p
-
id
=
"2204"
><
/path></
svg
>
);
...
...
@@ -281,7 +281,8 @@ const BasicLayout = props => {
}
let
childrenName
=
currentChildrenRoute
?
currentChildrenRoute
.
name
:
parentMenuName
;
if
(
currentChildrenRoute
.
routes
)
{
setTabActiveKey
(
currentChildrenRoute
.
routes
[
0
].
path
)
const
active
=
currentChildrenRoute
.
routes
.
find
(
item
=>
item
.
name
===
initSelectRoute
.
name
);
setTabActiveKey
(
active
.
path
)
}
else
{
setTabActiveKey
(
currentChildrenRoute
.
path
);
}
...
...
@@ -299,9 +300,6 @@ const BasicLayout = props => {
])
}
},
[]);
window
.
share
&&
window
.
share
.
event
&&
window
.
share
.
event
.
on
(
'event:updateCurrentChildrenRoutes'
,
({
currentPath
,
currentRoute
,
selectedIndex
})
=>
{
currentRoute
&&
currentRoute
.
parent
&&
currentRoute
.
parent
.
routes
?
setChildrenRoutes
(
currentRoute
.
parent
.
routes
):
!
currentRoute
.
parent
?
setChildrenRoutes
(
currentRoute
.
routes
):
setChildrenRoutes
([
currentRoute
]);
setSelectIndex
(
selectedIndex
);
...
...
@@ -317,8 +315,6 @@ const BasicLayout = props => {
}
])
})
useEffect
(()
=>
{
siteAction
.
setGlobalConfig
(
props
.
global
);
if
(
!
Cookies
.
get
(
'token'
))
{
...
...
@@ -349,6 +345,19 @@ const BasicLayout = props => {
}
])
});
/**
* web4全屏退出,切换三级菜单高亮
*/
window
.
share
.
event
.
on
(
'event:history'
,
params
=>
{
setTimeout
(()
=>
{
const
routes
=
currentRoutes
.
routes
[
selectIndex
];
if
(
routes
)
{
const
route
=
routes
&&
routes
.
routes
.
find
(
item
=>
item
.
path
===
decodeURI
(
window
.
location
.
pathname
.
replace
(
'/civbase'
,
''
)));
setTabActiveKey
(
route
.
path
)
}
},
0
)
})
// window.share && window.share.event.on('event:microError', event => {
// // window.history.pushState({message: '应用服务请求异常,请检查应用配置'}, null, '/civbase/404')
...
...
This diff is collapsed.
Click to expand it.
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