From 9d3ac80fe98bc76c7629907bba10041de87db28b Mon Sep 17 00:00:00 2001 From: toesbieya <1647775459@qq.com> Date: Wed, 26 Feb 2020 14:51:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E4=BF=9D=E7=95=99ic?= =?UTF-8?q?on=E5=8D=A0=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sidebar/components/SidebarItemContent.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/vue/src/layout/components/Sidebar/components/SidebarItemContent.vue b/vue/src/layout/components/Sidebar/components/SidebarItemContent.vue index e2a5851..e242146 100644 --- a/vue/src/layout/components/Sidebar/components/SidebarItemContent.vue +++ b/vue/src/layout/components/Sidebar/components/SidebarItemContent.vue @@ -10,14 +10,18 @@ const {icon, title} = context.props const vnodes = [] + let iconComponent + if (icon) { const isElIcon = icon.startsWith('el-icon-') - vnodes.push(isElIcon ? : ) + iconComponent = isElIcon ? : } + else iconComponent = + + vnodes.push(iconComponent) + + if (title) vnodes.push({(title)}) - if (title) { - vnodes.push({(title)}) - } return vnodes } }