diff --git a/src/layouts/LeftMode.vue b/src/layouts/LeftMode.vue
index 5b6d0545..dbb798e8 100644
--- a/src/layouts/LeftMode.vue
+++ b/src/layouts/LeftMode.vue
@@ -66,6 +66,10 @@ $transition-time: 0.35s;
}
.sidebar-container {
+ --el-menu-bg-color: var(--v3-sidebar-menu-bg-color);
+ --el-menu-hover-bg-color: var(--v3-sidebar-menu-hover-bg-color);
+ --el-menu-text-color: var(--v3-sidebar-menu-text-color);
+ --el-menu-active-color: var(--v3-sidebar-menu-active-text-color);
background-color: var(--v3-sidebar-menu-bg-color);
transition: width $transition-time;
width: var(--v3-sidebar-width) !important;
diff --git a/src/layouts/components/NavigationBar/index.vue b/src/layouts/components/NavigationBar/index.vue
index e8413e93..5bec4697 100644
--- a/src/layouts/components/NavigationBar/index.vue
+++ b/src/layouts/components/NavigationBar/index.vue
@@ -98,16 +98,6 @@ const logout = () => {
flex: 1;
// 设置 min-width 是为了让 Sidebar 里的 el-menu 宽度自适应
min-width: 0px;
- :deep(.el-menu) {
- background-color: transparent;
- }
- :deep(.el-sub-menu) {
- &.is-active {
- .el-sub-menu__title {
- color: var(--el-color-primary) !important;
- }
- }
- }
}
.right-menu {
margin-right: 10px;
diff --git a/src/layouts/components/Sidebar/index.vue b/src/layouts/components/Sidebar/index.vue
index 29f6a567..5c321a34 100644
--- a/src/layouts/components/Sidebar/index.vue
+++ b/src/layouts/components/Sidebar/index.vue
@@ -8,11 +8,11 @@ import SidebarItem from "./SidebarItem.vue"
import Logo from "../Logo/index.vue"
import { useDevice } from "@/hooks/useDevice"
import { useLayoutMode } from "@/hooks/useLayoutMode"
-import { getCssVariableValue } from "@/utils"
+// import { getCssVariableValue } from "@/utils"
-const v3SidebarMenuBgColor = getCssVariableValue("--v3-sidebar-menu-bg-color")
-const v3SidebarMenuTextColor = getCssVariableValue("--v3-sidebar-menu-text-color")
-const v3SidebarMenuActiveTextColor = getCssVariableValue("--v3-sidebar-menu-active-text-color")
+// const v3SidebarMenuBgColor = getCssVariableValue("--v3-sidebar-menu-bg-color")
+// const v3SidebarMenuTextColor = getCssVariableValue("--v3-sidebar-menu-text-color")
+// const v3SidebarMenuActiveTextColor = getCssVariableValue("--v3-sidebar-menu-active-text-color")
const { isMobile } = useDevice()
const { isLeft, isTop } = useLayoutMode()
@@ -31,15 +31,15 @@ const activeMenu = computed(() => {
const noHiddenRoutes = computed(() => permissionStore.routes.filter((item) => !item.meta?.hidden))
const isCollapse = computed(() => !appStore.sidebar.opened)
const isLogo = computed(() => isLeft.value && settingsStore.showLogo)
-const backgroundColor = computed(() => (isLeft.value ? v3SidebarMenuBgColor : undefined))
-const textColor = computed(() => (isLeft.value ? v3SidebarMenuTextColor : undefined))
-const activeTextColor = computed(() => (isLeft.value ? v3SidebarMenuActiveTextColor : undefined))
+// const backgroundColor = computed(() => (isLeft.value ? v3SidebarMenuBgColor : undefined))
+// const textColor = computed(() => (isLeft.value ? v3SidebarMenuTextColor : undefined))
+// const activeTextColor = computed(() => (isLeft.value ? v3SidebarMenuActiveTextColor : undefined))
const sidebarMenuItemHeight = computed(() => {
return !isTop.value ? "var(--v3-sidebar-menu-item-height)" : "var(--v3-navigationbar-height)"
})
-const sidebarMenuHoverBgColor = computed(() => {
- return !isTop.value ? "var(--v3-sidebar-menu-hover-bg-color)" : "transparent"
-})
+// const sidebarMenuHoverBgColor = computed(() => {
+// return !isTop.value ? "var(--v3-sidebar-menu-hover-bg-color)" : "transparent"
+// })
const tipLineWidth = computed(() => {
return !isTop.value ? "2px" : "0px"
})
@@ -56,12 +56,10 @@ const hiddenScrollbarVerticalBar = computed(() => {
@@ -69,6 +67,15 @@ const hiddenScrollbarVerticalBar = computed(() => {
+
+