From 661e8cf7b40d79d2024969e56f04100b31abef1a Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 11 Feb 2026 15:38:13 +0800
Subject: [PATCH] 优化字典类型属性提醒说明
---
ruoyi-ui/src/layout/components/Sidebar/index.vue | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/ruoyi-ui/src/layout/components/Sidebar/index.vue b/ruoyi-ui/src/layout/components/Sidebar/index.vue
index 1004f53..b61f0a4 100644
--- a/ruoyi-ui/src/layout/components/Sidebar/index.vue
+++ b/ruoyi-ui/src/layout/components/Sidebar/index.vue
@@ -1,19 +1,19 @@
<template>
- <div :class="{'has-logo':showLogo}">
+ <div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<logo v-if="showLogo" :collapse="isCollapse" />
- <el-scrollbar wrap-class="scrollbar-wrapper">
+ <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
- :background-color="variables.menuBg"
- :text-color="variables.menuText"
+ :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
+ :text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
:unique-opened="true"
:active-text-color="settings.theme"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item
- v-for="(route, index) in permission_routes"
+ v-for="(route, index) in sidebarRouters"
:key="route.path + index"
:item="route"
:base-path="route.path"
@@ -24,34 +24,34 @@
</template>
<script>
-import { mapGetters, mapState } from "vuex";
-import Logo from "./Logo";
-import SidebarItem from "./SidebarItem";
-import variables from "@/assets/styles/variables.scss";
+import { mapGetters, mapState } from "vuex"
+import Logo from "./Logo"
+import SidebarItem from "./SidebarItem"
+import variables from "@/assets/styles/variables.scss"
export default {
components: { SidebarItem, Logo },
computed: {
...mapState(["settings"]),
- ...mapGetters(["permission_routes", "sidebar"]),
+ ...mapGetters(["sidebarRouters", "sidebar"]),
activeMenu() {
- const route = this.$route;
- const { meta, path } = route;
+ const route = this.$route
+ const { meta, path } = route
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
- return meta.activeMenu;
+ return meta.activeMenu
}
- return path;
+ return path
},
showLogo() {
- return this.$store.state.settings.sidebarLogo;
+ return this.$store.state.settings.sidebarLogo
},
variables() {
- return variables;
+ return variables
},
isCollapse() {
- return !this.sidebar.opened;
+ return !this.sidebar.opened
}
}
-};
+}
</script>
--
Gitblit v1.9.3