2017-08-23 10:07:14 +00:00
|
|
|
@import "mixins/mixins";
|
2017-08-25 05:37:56 +00:00
|
|
|
@import "mixins/utils";
|
2017-08-23 10:07:14 +00:00
|
|
|
@import "common/var";
|
|
|
|
|
|
|
|
@mixin menu-item {
|
|
|
|
height: 56px;
|
|
|
|
line-height: 56px;
|
|
|
|
font-size: 14px;
|
|
|
|
color: $--menu-item-color;
|
|
|
|
padding: 0 20px;
|
|
|
|
cursor: pointer;
|
|
|
|
position: relative;
|
|
|
|
transition: border-color .3s, background-color .3s, color .3s;
|
|
|
|
box-sizing: border-box;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include b(menu) {
|
2017-09-16 12:50:19 +00:00
|
|
|
border-right: solid 1px #e6e6e6;
|
2017-08-23 10:07:14 +00:00
|
|
|
list-style: none;
|
|
|
|
position: relative;
|
|
|
|
margin: 0;
|
|
|
|
padding-left: 0;
|
|
|
|
background-color: $--menu-item-fill;
|
|
|
|
@include utils-clearfix;
|
|
|
|
|
|
|
|
& li {
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include m(horizontal) {
|
2017-09-16 12:50:19 +00:00
|
|
|
border-right: none;
|
|
|
|
border-bottom: solid 1px #e6e6e6;
|
2017-08-23 10:07:14 +00:00
|
|
|
& .el-menu-item {
|
|
|
|
float: left;
|
|
|
|
height: 60px;
|
|
|
|
line-height: 60px;
|
|
|
|
margin: 0;
|
|
|
|
cursor: pointer;
|
|
|
|
position: relative;
|
|
|
|
box-sizing: border-box;
|
2017-09-16 12:50:19 +00:00
|
|
|
border-bottom: 2px solid transparent;
|
|
|
|
color: $--color-text-secondary;
|
2017-08-23 10:07:14 +00:00
|
|
|
|
|
|
|
a,
|
|
|
|
a:hover {
|
|
|
|
color: inherit;
|
|
|
|
}
|
|
|
|
|
2017-09-26 10:30:04 +00:00
|
|
|
&:hover, &:focus{
|
2017-09-16 12:50:19 +00:00
|
|
|
background-color: #fff;
|
2017-08-23 10:07:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
& .el-submenu {
|
|
|
|
float: left;
|
|
|
|
position: relative;
|
2017-09-26 10:30:04 +00:00
|
|
|
&:focus {
|
|
|
|
outline: none;
|
|
|
|
> .el-submenu__title {
|
|
|
|
color: $--color-text-primary;
|
|
|
|
}
|
|
|
|
}
|
2017-08-23 10:07:14 +00:00
|
|
|
> .el-menu {
|
|
|
|
position: absolute;
|
|
|
|
top: 65px;
|
|
|
|
left: 0;
|
2017-09-16 12:50:19 +00:00
|
|
|
border: none;
|
2017-08-23 10:07:14 +00:00
|
|
|
padding: 5px 0;
|
|
|
|
background-color: $--color-white;
|
|
|
|
z-index: 100;
|
|
|
|
min-width: 100%;
|
2017-09-16 12:50:19 +00:00
|
|
|
box-shadow: $--box-shadow-light;
|
2017-09-19 14:35:57 +00:00
|
|
|
border-radius: $--border-radius-small;
|
2017-08-23 10:07:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
& .el-submenu__title {
|
|
|
|
height: 60px;
|
|
|
|
line-height: 60px;
|
2017-09-16 12:50:19 +00:00
|
|
|
border-bottom: 2px solid transparent;
|
|
|
|
color: $--color-text-secondary;
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-submenu__title:hover {
|
|
|
|
background-color: #fff;
|
2017-08-23 10:07:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
& .el-menu-item {
|
|
|
|
background-color: $--color-white;
|
|
|
|
float: none;
|
|
|
|
height: 36px;
|
|
|
|
line-height: 36px;
|
|
|
|
padding: 0 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
& .el-submenu__icon-arrow {
|
|
|
|
position: static;
|
|
|
|
vertical-align: middle;
|
2017-09-16 12:50:19 +00:00
|
|
|
margin-left: 8px;
|
2017-08-23 10:07:14 +00:00
|
|
|
margin-top: -3px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
& .el-menu-item:hover,
|
2017-09-26 10:30:04 +00:00
|
|
|
& .el-submenu__title:hover,
|
|
|
|
& .el-menu-item:focus {
|
|
|
|
outline: none;
|
2017-09-16 12:50:19 +00:00
|
|
|
color: $--color-text-primary;
|
2017-08-23 10:07:14 +00:00
|
|
|
}
|
2017-09-16 12:50:19 +00:00
|
|
|
& > .el-menu-item.is-active,
|
2017-08-23 10:07:14 +00:00
|
|
|
& > .el-submenu.is-active .el-submenu__title {
|
2017-09-16 12:50:19 +00:00
|
|
|
border-bottom: 2px solid $--color-primary;
|
|
|
|
color: $--color-text-primary;
|
2017-08-23 10:07:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(collapse) {
|
|
|
|
width: 64px;
|
|
|
|
|
|
|
|
> .el-menu-item,
|
|
|
|
> .el-submenu > .el-submenu__title {
|
|
|
|
[class^="el-icon-"] {
|
|
|
|
margin: 0;
|
|
|
|
vertical-align: middle;
|
|
|
|
width: 24px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
.el-submenu__icon-arrow {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
span {
|
|
|
|
height: 0;
|
|
|
|
width: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
visibility: hidden;
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-16 12:50:19 +00:00
|
|
|
> .el-menu-item.is-active i {
|
|
|
|
color: inherit;
|
|
|
|
}
|
|
|
|
|
2017-08-23 10:07:14 +00:00
|
|
|
.el-submenu {
|
|
|
|
position: relative;
|
|
|
|
& .el-menu {
|
|
|
|
position: absolute;
|
|
|
|
margin-left: 5px;
|
|
|
|
top: 0;
|
|
|
|
left: 100%;
|
|
|
|
z-index: 10;
|
2017-09-19 14:35:57 +00:00
|
|
|
border: 1px solid $--border-color-light;
|
|
|
|
border-radius: $--border-radius-small;
|
2017-09-16 12:50:19 +00:00
|
|
|
box-shadow: $--box-shadow-light;
|
2017-08-23 10:07:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.is-opened {
|
|
|
|
> .el-submenu__title .el-submenu__icon-arrow {
|
|
|
|
transform: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(menu-item) {
|
|
|
|
@include menu-item;
|
|
|
|
|
|
|
|
& [class^="el-icon-"] {
|
|
|
|
margin-right: 5px;
|
|
|
|
width: 24px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
& * {
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
&:first-child {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
&:last-child {
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
2017-09-26 10:30:04 +00:00
|
|
|
&:hover, &:focus {
|
|
|
|
outline: none;
|
2017-09-16 12:50:19 +00:00
|
|
|
background-color: $--menu-item-hover-fill;
|
|
|
|
}
|
|
|
|
i {
|
|
|
|
color: $--color-text-secondary;
|
2017-08-23 10:07:14 +00:00
|
|
|
}
|
|
|
|
@include when(active) {
|
|
|
|
color: $--color-primary;
|
2017-09-30 07:57:08 +00:00
|
|
|
i {
|
|
|
|
color: inherit;
|
|
|
|
}
|
2017-08-23 10:07:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@include b(submenu) {
|
|
|
|
@include e(title) {
|
|
|
|
position: relative;
|
|
|
|
@include menu-item;
|
|
|
|
|
|
|
|
& * {
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
2017-09-16 12:50:19 +00:00
|
|
|
|
|
|
|
i {
|
|
|
|
color: $--color-text-secondary;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: $--menu-item-hover-fill;
|
|
|
|
}
|
2017-08-23 10:07:14 +00:00
|
|
|
}
|
|
|
|
& .el-menu {
|
2017-09-16 12:50:19 +00:00
|
|
|
border: none;
|
2017-08-23 10:07:14 +00:00
|
|
|
}
|
|
|
|
& .el-menu-item {
|
|
|
|
height: 50px;
|
|
|
|
line-height: 50px;
|
|
|
|
padding: 0 45px;
|
|
|
|
min-width: 200px;
|
|
|
|
}
|
|
|
|
@include e(icon-arrow) {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
right: 20px;
|
|
|
|
margin-top: -7px;
|
|
|
|
transition: transform .3s;
|
|
|
|
font-size: 12px;
|
|
|
|
}
|
|
|
|
@include when(active) {
|
|
|
|
.el-submenu__title {
|
|
|
|
border-bottom-color: $--color-primary;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include when(opened) {
|
|
|
|
> .el-submenu__title .el-submenu__icon-arrow {
|
|
|
|
transform: rotateZ(180deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
[class^="el-icon-"] {
|
|
|
|
vertical-align: middle;
|
|
|
|
margin-right: 5px;
|
|
|
|
width: 24px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@include b(menu-item-group) {
|
|
|
|
> ul {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
@include e(title) {
|
2017-09-16 12:50:19 +00:00
|
|
|
padding: 7px 0 7px 20px;
|
2017-08-23 10:07:14 +00:00
|
|
|
line-height: normal;
|
2017-09-16 12:50:19 +00:00
|
|
|
font-size: 12px;
|
|
|
|
color: $--color-text-secondary;
|
2017-08-23 10:07:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.horizontal-collapse-transition .el-submenu__title .el-submenu__icon-arrow {
|
|
|
|
transition: .2s;
|
|
|
|
opacity: 0;
|
|
|
|
}
|