From e69c2c8afc48ee51a70ccef9d206c462d1b83a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?= Date: Wed, 27 Feb 2019 13:59:39 +0800 Subject: [PATCH] fix[Sidebar]: fixed infinite loop bug (#289) --- src/views/layout/components/Sidebar/SidebarItem.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/layout/components/Sidebar/SidebarItem.vue b/src/views/layout/components/Sidebar/SidebarItem.vue index 6afc0ff..8f1dc23 100644 --- a/src/views/layout/components/Sidebar/SidebarItem.vue +++ b/src/views/layout/components/Sidebar/SidebarItem.vue @@ -58,9 +58,10 @@ 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 + return {} }, methods: { hasOneShowingChild(children, parent) {