Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NLT-e-cigarette
Project
Project
Details
Activity
Releases
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
张伯涛
NLT-e-cigarette
Commits
a85e2835
Commit
a85e2835
authored
Jul 27, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
836672d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
SidebarItem.vue
src/layout/components/Sidebar/SidebarItem.vue
+4
-5
index.vue
src/layout/components/Sidebar/index.vue
+4
-1
No files found.
src/layout/components/Sidebar/SidebarItem.vue
View file @
a85e2835
...
@@ -96,11 +96,10 @@ export default {
...
@@ -96,11 +96,10 @@ export default {
// When there is only one child router, the child router is displayed by default
// When there is only one child router, the child router is displayed by default
console
.
log
(
'showingChildren'
,
showingChildren
)
console
.
log
(
'showingChildren'
,
showingChildren
)
if
(
showingChildren
.
length
===
1
)
{
if
(
showingChildren
.
length
===
1
)
{
// if (showingChildren[0].path === '/Home') {
if
(
showingChildren
[
0
].
path
===
'/Home'
)
{
// return true
return
true
// }
}
// return false
return
false
return
true
}
}
// Show parent if there are no child router to display
// Show parent if there are no child router to display
...
...
src/layout/components/Sidebar/index.vue
View file @
a85e2835
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
:collapse-transition=
"false"
:collapse-transition=
"false"
mode=
"vertical"
mode=
"vertical"
>
>
<sidebar-item
v-for=
"(route, index) in permission_routes"
:
collapse=
"isCollapse"
:key=
"index"
:item=
"route"
:base-path=
"route.path"
@
closeMenu=
"closeMenu"
/>
<sidebar-item
v-for=
"(route, index) in permission_routes"
:
key=
"index"
:collapse=
"isCollapse"
:item=
"route"
:base-path=
"route.path"
@
closeMenu=
"closeMenu"
/>
</el-menu>
</el-menu>
</el-scrollbar>
</el-scrollbar>
</div>
</div>
...
@@ -51,6 +51,9 @@ export default {
...
@@ -51,6 +51,9 @@ export default {
return
!
this
.
sidebar
.
opened
return
!
this
.
sidebar
.
opened
}
}
},
},
mounted
()
{
console
.
log
(
'啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊'
,
this
.
permission_routes
)
},
methods
:
{
methods
:
{
closeMenu
()
{
closeMenu
()
{
this
.
$refs
.
myMenu
.
close
(
this
.
$refs
.
myMenu
.
openedMenus
[
0
])
this
.
$refs
.
myMenu
.
close
(
this
.
$refs
.
myMenu
.
openedMenus
[
0
])
...
...
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