This commit is contained in:
DESKTOP-369JRHT\12997 2024-07-04 16:00:35 +08:00
commit 6e751a49a9
25 changed files with 73 additions and 10 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

View File

@ -87,7 +87,13 @@
}
& .theme-dark .is-active > .el-submenu__title {
color: $base-menu-color-active !important;
color: white !important;
background: linear-gradient( 229deg, #FF8646 0%, #FFA360 100%) !important;
border-top-left-radius: 8px !important; /* 左上圆角 */
border-top-right-radius: 8px !important; /* 右上圆角 */
i {
color: #fff !important;
}
}
& .nest-menu .el-submenu>.el-submenu__title,
@ -107,6 +113,12 @@
background-color: $base-sub-menu-hover !important;
}
}
.el-menu-item.is-active {
color: #FF9655 !important;
//菜单点击上的背景颜色
background: linear-gradient( 229deg, #FFEFE5 0%, #FFEFE5 100%) !important;
}
}
.hideSidebar {

View File

@ -9,8 +9,8 @@ $yellow:#FEC171;
$panGreen: #30B08F;
// 默认菜单主题风格
$base-menu-color:#CCC;// 菜单全部字体颜色
$base-menu-color-active:#FF9655;// 父级菜单激活的字体颜色
$base-menu-color:#727171;// 菜单全部字体颜色
$base-menu-color-active:#FF9655;// 父级菜单激活的背景颜色
$base-menu-background:#fff;
$base-logo-title-color: #FF9655;
@ -18,8 +18,8 @@ $base-menu-light-color:#ffffff;
$base-menu-light-background:#ffffff;
$base-logo-light-title-color: #FF9655;
$base-sub-menu-background: #f8f8f8;//展开的背景色
$base-sub-menu-hover: #adadad;
$base-sub-menu-background: #FFFAF6;//展开的背景色
$base-sub-menu-hover: #FFEFE5;
$base-sidebar-width: 200px;

View File

@ -3,14 +3,58 @@
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" style="padding-left: 20px;" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
<!-- <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />-->
<span style="margin-left: 30px" v-if="onlyOneChild.meta.title!='系统首页'">{{onlyOneChild.meta.title}}</span>
<div v-else style="background-color: white;width: 200px;height: 100%;position: fixed;left: 0px">
<img src="@/assets/menu_icon/home.png" v-if="activeMenu!='/index'" style="width: 21px;height: 21px;margin-right: 10px;margin-left: 20px"/>
<img src="@/assets/menu_icon/home_c.png" v-else style="width: 21px;height: 21px;margin-right: 10px;margin-left: 16px"/>
<span>{{onlyOneChild.meta.title}}</span>
</div>
</el-menu-item>
</app-link>
</template>
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
<template slot="title">
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
<!-- <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />-->
<span style="margin-right: 10px;" v-if="item.meta.title=='交接班'">
<img src="@/assets/menu_icon/ren.png" v-if="!activeMenu.includes('/handover')" style="width: 21px;height: 21px;"/>
<img src="@/assets/menu_icon/ren_b.png" v-else style="width: 21px;height: 21px;"/>
</span>
<span style="margin-right: 10px;" v-if="item.meta.title=='门店管理'">
<img src="@/assets/menu_icon/shouye.png" v-if="!activeMenu.includes(item.path) && !activeMenu.includes('/staff') && !activeMenu.includes('/feedBack') && !activeMenu.includes('/duty')" style="width: 21px;height: 21px;"/>
<img src="@/assets/menu_icon/shouye_b.png" v-else style="width: 21px;height: 21px;"/>
</span>
<span style="margin-right: 10px;" v-if="item.meta.title=='会员管理'">
<img src="@/assets/menu_icon/user.png" v-if="!activeMenu.includes(item.path) && !activeMenu.includes('/userGrade')" style="width: 21px;height: 21px;"/>
<img src="@/assets/menu_icon/user_b.png" v-else style="width: 21px;height: 21px;"/>
</span>
<span style="margin-right: 10px;" v-if="item.meta.title=='油站管理'">
<img src="@/assets/menu_icon/youqiang.png" v-if="!activeMenu.includes(item.path)" style="width: 21px;height: 21px;"/>
<img src="@/assets/menu_icon/youqiang_b.png" v-else style="width: 21px;height: 21px;"/>
</span>
<span style="margin-right: 10px;" v-if="item.meta.title=='便利店'">
<img src="@/assets/menu_icon/car.png" v-if="!activeMenu.includes('/convenience')" style="width: 21px;height: 21px;"/>
<img src="@/assets/menu_icon/car_b.png" v-else style="width: 21px;height: 21px;"/>
</span>
<span style="margin-right: 10px;" v-if="item.meta.title=='积分商城'">
<img src="@/assets/menu_icon/lihe.png" v-if="!activeMenu.includes('/integral')" style="width: 21px;height: 21px;"/>
<img src="@/assets/menu_icon/lihe_b.png" v-else style="width: 21px;height: 21px;"/>
</span>
<span style="margin-right: 10px;" v-if="item.meta.title=='订单管理'">
<img src="@/assets/menu_icon/wendang.png" v-if="!activeMenu.includes(item.path)" style="width: 21px;height: 21px;"/>
<img src="@/assets/menu_icon/wendang_b.png" v-else style="width: 21px;height: 21px;"/>
</span>
<span style="margin-right: 10px;" v-if="item.meta.title=='活动营销'">
<img src="@/assets/menu_icon/laba.png" v-if="!activeMenu.includes('/EventMarketing')" style="width: 21px;height: 21px;"/>
<img src="@/assets/menu_icon/laba_b.png" v-else style="width: 21px;height: 21px;"/>
</span>
<span style="margin-right: 10px;" v-if="item.meta.title=='配置管理'">
<img src="@/assets/menu_icon/setting.png" v-if="!activeMenu.includes('/setting') && !activeMenu.includes('/power')" style="width: 21px;height: 21px;"/>
<img src="@/assets/menu_icon/setting_b.png" v-else style="width: 21px;height: 21px;"/>
</span>
<span>{{item.meta.title}}</span>
</template>
<sidebar-item
v-for="child in item.children"
@ -49,11 +93,17 @@ export default {
basePath: {
type: String,
default: ''
},
activeMenu: {
type: String,
default: ''
}
},
data() {
this.onlyOneChild = null
return {}
return {
defaultActive:""
}
},
methods: {
hasOneShowingChild(children = [], parent) {

View File

@ -17,10 +17,11 @@
style="margin-bottom: 80px;"
>
<sidebar-item
v-for="(route, index) in sidebarRouters"
v-for="(route, index) in sidebarRouters"
:key="route.path + index"
:item="route"
:base-path="route.path"
:activeMenu="activeMenu"
/>
</el-menu>
</el-scrollbar>