|
|
@@ -2,6 +2,7 @@
|
|
|
import { computed } from 'vue'
|
|
|
import { useRoute } from 'vue-router'
|
|
|
import SidebarItem from './SidebarItem.vue'
|
|
|
+import SidebarLogo from './SidebarLogo.vue'
|
|
|
import { usePermissionStore } from '@/store/modules/permission'
|
|
|
|
|
|
const route = useRoute()
|
|
|
@@ -20,18 +21,13 @@ const menuList = computed(() => permissionStore.menuList)
|
|
|
|
|
|
<template>
|
|
|
<div class="sidebar">
|
|
|
- <div class="sidebar-logo">
|
|
|
- <span>Admin</span>
|
|
|
- </div>
|
|
|
+ <SidebarLogo />
|
|
|
|
|
|
<el-scrollbar class="sidebar-scroll">
|
|
|
<el-menu
|
|
|
:default-active="activeMenu"
|
|
|
:unique-opened="true"
|
|
|
mode="vertical"
|
|
|
- background-color="#1a1a24"
|
|
|
- text-color="rgba(255,255,255,0.65)"
|
|
|
- active-text-color="#ffffff"
|
|
|
router
|
|
|
>
|
|
|
<SidebarItem
|
|
|
@@ -49,20 +45,7 @@ const menuList = computed(() => permissionStore.menuList)
|
|
|
height: 100%;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
-}
|
|
|
-
|
|
|
-.sidebar-logo {
|
|
|
- height: 88px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
|
|
-
|
|
|
- span {
|
|
|
- color: #fff;
|
|
|
- font-size: 24px;
|
|
|
- font-weight: 600;
|
|
|
- }
|
|
|
+ background-color: var(--admin-sidebar-bg);
|
|
|
}
|
|
|
|
|
|
.sidebar-scroll {
|
|
|
@@ -72,16 +55,21 @@ const menuList = computed(() => permissionStore.menuList)
|
|
|
|
|
|
:deep(.el-menu) {
|
|
|
border-right: none;
|
|
|
+ background-color: transparent !important;
|
|
|
|
|
|
.el-menu-item,
|
|
|
.el-sub-menu__title {
|
|
|
+ color: var(--admin-text-secondary) !important;
|
|
|
+ background-color: transparent !important;
|
|
|
+
|
|
|
&:hover {
|
|
|
- background-color: #2d2d3d !important;
|
|
|
+ background-color: var(--admin-border-color) !important;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.el-menu-item.is-active {
|
|
|
- background-color: #2d2d3d;
|
|
|
+ color: var(--el-color-primary) !important;
|
|
|
+ background-color: var(--admin-border-color) !important;
|
|
|
}
|
|
|
}
|
|
|
</style>
|