From 881dc3fcf09ad6cc6347b4b09f1172b353645d49 Mon Sep 17 00:00:00 2001 From: 谢凯 <viago@qq.com> Date: 星期一, 22 三月 2021 17:52:34 +0800 Subject: [PATCH] update ruoyi-ui/src/views/system/user/profile/userAvatar.vue. --- 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