From e02f6923593bd49f87caccd87e063baf312aaa3f Mon Sep 17 00:00:00 2001 From: 稚屿 <1491182878@qq.com> Date: 星期一, 22 八月 2022 14:19:08 +0800 Subject: [PATCH] 修复菜单管理已知问题 问题描述:在菜单管理下,类型为菜单或者按钮的条目下点击修改按钮。 情况1,如果是类型为菜单,第一次点击修改按钮正常,则第二次点击另一个条目后面的修改按钮时报错! 情况2,如果是类型为按钮,第一次点击修改时正常,当点击取消按钮关闭弹窗时,浏览器报错! --- ruoyi-ui/src/layout/components/Sidebar/index.vue | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ruoyi-ui/src/layout/components/Sidebar/index.vue b/ruoyi-ui/src/layout/components/Sidebar/index.vue index 0a87943..24fb533 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}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }"> + <div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"> <logo v-if="showLogo" :collapse="isCollapse" /> <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> <el-menu :default-active="activeMenu" :collapse="isCollapse" - :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg" - :text-color="settings.sideTheme === 'theme-dark' ? variables.menuText : 'rgba(0,0,0,.65)'" + :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" @@ -33,7 +33,7 @@ components: { SidebarItem, Logo }, computed: { ...mapState(["settings"]), - ...mapGetters(["permission_routes", "sidebar"]), + ...mapGetters(["sidebarRouters", "sidebar"]), activeMenu() { const route = this.$route; const { meta, path } = route; -- Gitblit v1.9.2