Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
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
JIRA
JIRA
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
黄瑜
VueElementTemplate
Commits
108b380d
Commit
108b380d
authored
Jul 28, 2017
by
Pan
Committed by
花裤衩
Jul 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
menu 支持 icon 嵌套
parent
69fc52d4
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
11 deletions
+7
-11
iconfont.js
src/assets/iconfont/iconfont.js
+1
-1
sidebar.scss
src/styles/sidebar.scss
+4
-5
Layout.vue
src/views/layout/Layout.vue
+0
-3
SidebarItem.vue
src/views/layout/SidebarItem.vue
+2
-2
No files found.
src/assets/iconfont/iconfont.js
View file @
108b380d
This diff is collapsed.
Click to expand it.
src/styles/sidebar.scss
View file @
108b380d
...
@@ -7,17 +7,13 @@
...
@@ -7,17 +7,13 @@
margin-right
:
16px
;
margin-right
:
16px
;
}
}
.hideSidebar
.svg-icon
{
margin-right
:
0
;
}
.hideSidebar
.el-submenu
>
.el-submenu__title
,
.hideSidebar
.el-submenu
>
.el-submenu__title
,
.hideSidebar
.submenu-title-noDropdown
{
.hideSidebar
.submenu-title-noDropdown
{
padding-left
:
10px
!
important
;
padding-left
:
10px
!
important
;
}
}
.hideSidebar
.submenu-title-noDropdown
span
,
.hideSidebar
.submenu-title-noDropdown
span
,
.hideSidebar
.el-submenu
>
.el-submenu__title
span
{
.hideSidebar
.el-submenu
>
.el-submenu__title
>
span
{
height
:
0
;
height
:
0
;
width
:
0
;
width
:
0
;
overflow
:
hidden
;
overflow
:
hidden
;
...
@@ -32,6 +28,7 @@
...
@@ -32,6 +28,7 @@
height
:
auto
;
height
:
auto
;
width
:
auto
;
width
:
auto
;
visibility
:
visible
;
visibility
:
visible
;
display
:
inline
;
}
}
.el-submenu__icon-arrow
{
.el-submenu__icon-arrow
{
display
:
block
!
important
;
display
:
block
!
important
;
...
@@ -65,6 +62,8 @@
...
@@ -65,6 +62,8 @@
visibility
:
visible
;
visibility
:
visible
;
position
:
absolute
;
position
:
absolute
;
right
:
-145px
;
right
:
-145px
;
text-align
:
left
;
text-indent
:
20px
;
top
:
0px
;
top
:
0px
;
background-color
:
#1f2d3d
;
background-color
:
#1f2d3d
;
opacity
:
1
;
opacity
:
1
;
...
...
src/views/layout/Layout.vue
View file @
108b380d
...
@@ -51,9 +51,6 @@
...
@@ -51,9 +51,6 @@
left
:
0
;
left
:
0
;
z-index
:
1001
;
z-index
:
1001
;
background
:
red
;
background
:
red
;
// overflow-y: auto;
&
:
:-
webkit-scrollbar
{
display
:none
}
}
}
.main-container
{
.main-container
{
min-height
:
100%
;
min-height
:
100%
;
...
...
src/views/layout/SidebarItem.vue
View file @
108b380d
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<el-submenu
:index=
"item.name"
v-if=
"!item.noDropdown&&!item.hidden"
>
<el-submenu
:index=
"item.name"
v-if=
"!item.noDropdown&&!item.hidden"
>
<template
slot=
"title"
>
<template
slot=
"title"
>
<icon-svg
v-if=
'item.icon'
:icon-class=
"item.icon"
></icon-svg><span
slot=
"title"
>
{{
item
.
name
}}
</span>
<icon-svg
v-if=
'item.icon'
:icon-class=
"item.icon"
></icon-svg><span>
{{
item
.
name
}}
</span>
</
template
>
</
template
>
<
template
v-for=
"child in item.children"
v-if=
'!child.hidden'
>
<
template
v-for=
"child in item.children"
v-if=
'!child.hidden'
>
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<router-link
v-else
:to=
"item.path+'/'+child.path"
>
<router-link
v-else
:to=
"item.path+'/'+child.path"
>
<el-menu-item
:index=
"item.path+'/'+child.path"
>
<el-menu-item
:index=
"item.path+'/'+child.path"
>
<span
slot=
"title"
>
{{
child
.
name
}}
</span>
<icon-svg
v-if=
'child.icon'
:icon-class=
"child.icon"
></icon-svg><span
>
{{
child
.
name
}}
</span>
</el-menu-item>
</el-menu-item>
</router-link>
</router-link>
...
...
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