Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
d5f9b5b7
Commit
d5f9b5b7
authored
Mar 30, 2022
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
topNav自定义隐藏侧边栏路由
parent
2043d1f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
ruoyi-ui/src/components/TopNav/index.vue
ruoyi-ui/src/components/TopNav/index.vue
+4
-10
No files found.
ruoyi-ui/src/components/TopNav/index.vue
View file @
d5f9b5b7
...
...
@@ -30,13 +30,14 @@
<
script
>
import
{
constantRoutes
}
from
"
@/router
"
;
// 隐藏侧边栏路由
const
hideList
=
[
'
/index
'
,
'
/user/profile
'
];
export
default
{
data
()
{
return
{
// 顶部栏初始数
visibleNumber
:
5
,
// 是否为首次加载
isFrist
:
false
,
// 当前激活菜单的 index
currentIndex
:
undefined
};
...
...
@@ -88,17 +89,10 @@ export default {
activeMenu
()
{
const
path
=
this
.
$route
.
path
;
let
activePath
=
path
;
if
(
path
.
lastIndexOf
(
"
/
"
)
>
0
)
{
if
(
path
!==
undefined
&&
path
.
lastIndexOf
(
"
/
"
)
>
0
&&
hideList
.
indexOf
(
path
)
===
-
1
)
{
const
tmpPath
=
path
.
substring
(
1
,
path
.
length
);
activePath
=
"
/
"
+
tmpPath
.
substring
(
0
,
tmpPath
.
indexOf
(
"
/
"
));
this
.
$store
.
dispatch
(
'
app/toggleSideBarHide
'
,
false
);
}
else
if
(
"
/index
"
==
path
||
""
==
path
)
{
if
(
!
this
.
isFrist
)
{
this
.
isFrist
=
true
;
}
else
{
activePath
=
"
index
"
;
}
this
.
$store
.
dispatch
(
'
app/toggleSideBarHide
'
,
true
);
}
else
if
(
!
this
.
$route
.
children
)
{
activePath
=
path
;
this
.
$store
.
dispatch
(
'
app/toggleSideBarHide
'
,
true
);
...
...
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