Skip to content

Commit

Permalink
some improve
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Jan 10, 2019
1 parent 544c284 commit c8e2954
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/icons/svg/dashboard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/styles/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@
width: 100%;
overflow: hidden;
}
.is-active{
background-color:#161616!important;
}
.svg-icon {
margin-right: 16px;
fill:$primary;
Expand Down Expand Up @@ -145,8 +148,16 @@
// background-color: $subMenuBg !important;
&:hover {
background-color: $menuHover !important;
.el-submenu__icon-arrow{
color:white!important;
}
.svg-icon{
fill:white!important;
}

}


}
.el-menu--collapse .el-menu .el-submenu {
min-width: 225px !important;
Expand Down
34 changes: 23 additions & 11 deletions src/views/layout/components/SidebarItem.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
<template>
<div class="menu-wrapper">

<router-link
to="/dashboard"
>
<el-menu-item index="/dashboard">
<svg-icon
icon-class="dashboard"
/> Dashboard
</el-menu-item>
</router-link>


<template v-for="item in routes">
<RouterLink
<router-link
v-if="!item.hidden&&item.noDropdown&&item.children.length>0"
:key="item.name"
:to="item.path+'/'+item.children[0].path"
:to="item.path==='/'?'':item.path+'/'+item.children[0].path"
>
<ElMenuItem :index="item.path+'/'+item.children[0].path">
<el-menu-item :index="item.path==='/'?'':item.path+'/'+item.children[0].path">
<svg-icon
v-if="item.icon"
:icon-class="item.icon"
/> {{ item.children[0].meta.title }}
</ElMenuItem>
</RouterLink>
<ElSubmenu
</el-menu-item>
</router-link>
<el-submenu
v-if="!item.noDropdown&&!item.hidden"
:key="item.name"
:index="item.name"
Expand All @@ -33,18 +45,18 @@
:routes="[child]"
class="menu-indent"
/>
<RouterLink
<router-link
v-else
:key="child.name"
:to="item.path+'/'+child.path"
class="menu-indent"
>
<ElMenuItem :index="item.path+'/'+child.path">
<el-menu-item :index="item.path+'/'+child.path">
{{ child.meta.title }}
</ElMenuItem>
</RouterLink>
</el-menu-item>
</router-link>
</template>
</ElSubmenu>
</el-submenu>
</template>
</div>
</template>
Expand Down

0 comments on commit c8e2954

Please sign in to comment.