cxs 2 달 전
부모
커밋
8d4d1b7bcf
1개의 변경된 파일10개의 추가작업 그리고 4개의 파일을 삭제
  1. 10 4
      src/layouts/components/Menu/SubMenu.vue

+ 10 - 4
src/layouts/components/Menu/SubMenu.vue

@@ -2,16 +2,22 @@
   <template v-for="subItem in menuList" :key="subItem.path">
     <el-sub-menu v-if="subItem.children?.length" :index="subItem.path">
       <template #title>
-        <el-icon v-if="subItem.meta.icon">
-          <img class="img-icons" :src="getCustomIcon(isActive(subItem) ? subItem.meta.iconActive : subItem.meta.icon)" />
-        </el-icon>
+        <img
+          v-if="subItem.meta.icon"
+          class="img-icons"
+          :src="getCustomIcon(isActive(subItem) ? subItem.meta.iconActive : subItem.meta.icon)"
+        />
         <span class="sle" :class="isActive(subItem) ? 'menu-title-active' : 'menu-title'">{{ subItem.meta.title }}</span>
       </template>
       <SubMenu :menu-list="subItem.children" />
     </el-sub-menu>
     <el-menu-item v-else :index="subItem.path" @click="handleClickMenu(subItem)">
       <el-icon v-if="subItem.meta.icon">
-        <img class="img-icons" :src="getCustomIcon(isActive(subItem) ? subItem.meta.iconActive : subItem.meta.icon)" />
+        <img
+          v-if="subItem.meta.icon"
+          class="img-icons"
+          :src="getCustomIcon(isActive(subItem) ? subItem.meta.iconActive : subItem.meta.icon)"
+        />
       </el-icon>
       <template #title>
         <span class="sle">{{ subItem.meta.title }}</span>