From e544c01e63f3228c38147d72904e756b5d3d55c6 Mon Sep 17 00:00:00 2001 From: frank10000 <740427741@qq.com> Date: Wed, 27 Feb 2019 13:48:30 +0800 Subject: [PATCH] fix[Sidebar]: fixed infinite loop bug(#1333) * fixed infinite loop Bug when in hasOneShowingChild Edit the onlyOneChild * tweak --- src/views/layout/components/Sidebar/SidebarItem.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/layout/components/Sidebar/SidebarItem.vue b/src/views/layout/components/Sidebar/SidebarItem.vue index 3a6477f..58cee94 100644 --- a/src/views/layout/components/Sidebar/SidebarItem.vue +++ b/src/views/layout/components/Sidebar/SidebarItem.vue @@ -64,9 +64,9 @@ export default { } }, data() { - return { - onlyOneChild: null - } + // To fix https://github.com/PanJiaChen/vue-admin-template/issues/237 + // TODO: refactor with render function + this.onlyOneChild = null }, methods: { hasOneShowingChild(children, parent) { -- GitLab