From 64f6d28441e2036d2f21f9c22c2bc864733f588a Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期日, 25 七月 2021 20:08:55 +0800 Subject: [PATCH] 角色&菜单新增字段属性提示信息 --- ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue b/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue index 1ca89d2..21f8f6a 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue @@ -1,5 +1,5 @@ <template> - <div v-if="!item.hidden" class="menu-wrapper"> + <div v-if="!item.hidden"> <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"> <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)"> <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}"> @@ -56,6 +56,9 @@ }, methods: { hasOneShowingChild(children = [], parent) { + if (!children) { + children = []; + } const showingChildren = children.filter(item => { if (item.hidden) { return false -- Gitblit v1.9.2