|
@@ -5,31 +5,47 @@
|
|
|
>
|
|
|
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
|
|
<el-menu-item
|
|
|
- style="background: #041741"
|
|
|
:index="resolvePath(onlyOneChild.path)"
|
|
|
:class="{ 'submenu-title-noDropdown': !isNest }"
|
|
|
>
|
|
|
<!-- <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" /> -->
|
|
|
<!-- <item :icon="onlyOneChild.meta.title||(item.meta&&item.meta.title)"/> -->
|
|
|
- <el-tooltip
|
|
|
+ <!-- <el-tooltip
|
|
|
class="item"
|
|
|
effect="dark"
|
|
|
:content="onlyOneChild.meta.title"
|
|
|
placement="right"
|
|
|
- >
|
|
|
- <!-- <img class="nav_item" :src="onlyOneChild.meta.imger" /> -->
|
|
|
- <span class="pathName" :class="getClass(item.path)"></span>
|
|
|
- </el-tooltip>
|
|
|
- <!-- <span class="pathNameer">{{ onlyOneChild.meta.title }}</span> -->
|
|
|
+ > -->
|
|
|
+ <!-- <img class="nav_item" :src="onlyOneChild.meta.imger" /> -->
|
|
|
+ <!-- <span class="pathName" :class="getClass(item.path)"></span>
|
|
|
+ </el-tooltip> -->
|
|
|
+ <span
|
|
|
+ class="pathName"
|
|
|
+ v-if="!leup"
|
|
|
+ :class="getClass(item.path)"
|
|
|
+ ></span>
|
|
|
+ <span
|
|
|
+ class="pathNamecosy"
|
|
|
+ v-if="leup"
|
|
|
+ :class="getClass(item.path)"
|
|
|
+ ></span>
|
|
|
+ <span class="pathNameer" v-if="leup">{{
|
|
|
+ onlyOneChild.meta.title
|
|
|
+ }}</span>
|
|
|
</el-menu-item>
|
|
|
</app-link>
|
|
|
</template>
|
|
|
|
|
|
- <!-- <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
|
|
+ <el-submenu
|
|
|
+ v-else
|
|
|
+ ref="subMenu"
|
|
|
+ :index="resolvePath(item.path)"
|
|
|
+ popper-append-to-body
|
|
|
+ >
|
|
|
<template slot="title">
|
|
|
- <img class="nav_item" :src="onlyOneChild.meta.imger"/>
|
|
|
+ <img class="nav_item" :src="onlyOneChild.meta.imger" />
|
|
|
</template>
|
|
|
- </el-submenu> -->
|
|
|
+ </el-submenu>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -61,6 +77,10 @@ export default {
|
|
|
type: String,
|
|
|
default: "",
|
|
|
},
|
|
|
+ leup: {
|
|
|
+ type: Boolean,
|
|
|
+ default: true,
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
// To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
|
|
@@ -136,6 +156,33 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+::v-deep .el-menu-item.is-active {
|
|
|
+ //设置背景颜色
|
|
|
+ background-color: #2d67e3 !important;
|
|
|
+ //设置字体颜色
|
|
|
+ color: #ffffff !important;
|
|
|
+}
|
|
|
+
|
|
|
+// ::v-deep .el-menu-item.is-active:hover {
|
|
|
+// //设置背景颜色
|
|
|
+// background-color: #2d67e3 !important;
|
|
|
+// //设置字体颜色
|
|
|
+// color: #ffffff !important;
|
|
|
+// }
|
|
|
+
|
|
|
+// // ::v-deep .el-submenu__title:hover {
|
|
|
+// // background: red !important;
|
|
|
+// // }
|
|
|
+::v-deep .el-menu-item:hover {
|
|
|
+ background: #2d67e3 !important;
|
|
|
+ color: #fff !important;
|
|
|
+}
|
|
|
+::v-deep .el-menu-item {
|
|
|
+ transition: border-color 0.3s, background-color 0s, color 0s;
|
|
|
+}
|
|
|
+// ::v-deep .el-submenu__title.is-active {
|
|
|
+// background-color: #6db6ff !important;
|
|
|
+// }
|
|
|
.nav_item {
|
|
|
width: 36px;
|
|
|
height: 36px;
|
|
@@ -157,7 +204,6 @@ export default {
|
|
|
bottom: 0;
|
|
|
top: 0;
|
|
|
margin: auto;
|
|
|
- box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.1);
|
|
|
background-size: 100% 100%;
|
|
|
transition: all 0.3s;
|
|
|
}
|
|
@@ -165,17 +211,17 @@ export default {
|
|
|
width: 40px;
|
|
|
height: 40px;
|
|
|
position: absolute;
|
|
|
- left: -60%;
|
|
|
+ left: -74%;
|
|
|
right: 0;
|
|
|
bottom: 0;
|
|
|
top: 0;
|
|
|
margin: auto;
|
|
|
- box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.1);
|
|
|
+ // box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.1);
|
|
|
background-size: 100% 100%;
|
|
|
transition: all 0.3s;
|
|
|
}
|
|
|
.pathNameer {
|
|
|
- margin-left: 40%;
|
|
|
+ margin-left: 20%;
|
|
|
}
|
|
|
.pathNameercosy {
|
|
|
display: none;
|