From 0bc681efe63028f064b81d741c735e1ba3a1f030 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 3a6477f6..58cee945 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) {