Browse Source

listGroup

lifanagju_citu 11 months ago
parent
commit
ffa3b5034d
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/components/FormUI/nestedListGroup/components/listGroup.vue

+ 5 - 4
src/components/FormUI/nestedListGroup/components/listGroup.vue

@@ -17,13 +17,14 @@
         <template v-slot:activator="{ props }">
           <v-list-item v-bind="props" :title="val[item.itemText || 'label']"></v-list-item>
         </template>
-        <template v-if="!val.children?.length">
+        <template v-for="(k, i) in val.children" :key="item?.itemValue? k[item.itemValue] : i">
           <v-list-item
+            v-if="!k.children?.length"
             active-class="active"
             color="primary"
-            :title="val[item.itemText || 'label']"
-          >
-          </v-list-item>
+            :title="k[item.itemText || 'label']"
+          ></v-list-item>
+          <listGroup v-else :item="k"></listGroup>
         </template>
         <!-- <v-list-item
           v-for="(k, i) in val.children"