cxs 2 kuukautta sitten
vanhempi
commit
8d4d1b7bcf
1 muutettua tiedostoa jossa 10 lisäystä ja 4 poistoa
  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>