|
43 | 43 | :key="item.title" |
44 | 44 | v-model="item.model" |
45 | 45 | > |
| 46 | + |
46 | 47 | <template v-slot:prependIcon> |
47 | 48 | <v-icon size="24" class="mr-0" color="greyTint"> {{ item.icon }} </v-icon> |
48 | 49 | </template> |
|
57 | 58 | </template> |
58 | 59 |
|
59 | 60 | <v-list-item |
| 61 | + v-show="!item.type" |
60 | 62 | v-for="(child, i) in item.children" |
61 | 63 | :key="i" |
62 | 64 | :to="child.link" |
|
73 | 75 | </v-list-item-title> |
74 | 76 | </v-list-item-content> |
75 | 77 | </v-list-item> |
| 78 | + |
| 79 | + <template v-if="item.type"> |
| 80 | + <v-list-group |
| 81 | + v-for="(item, i) in item.children" |
| 82 | + :key="i" |
| 83 | + :value="true" |
| 84 | + no-action |
| 85 | + sub-group |
| 86 | + > |
| 87 | + <template v-slot:activator> |
| 88 | + <v-list-item-content> |
| 89 | + <v-list-item-title>{{ item.title }}</v-list-item-title> |
| 90 | + </v-list-item-content> |
| 91 | + </template> |
| 92 | + |
| 93 | + <v-list-item |
| 94 | + v-for="(child, i) in item.children" |
| 95 | + :key="i" |
| 96 | + link |
| 97 | + > |
| 98 | + <v-list-item-title v-text="child.title"></v-list-item-title> |
| 99 | + </v-list-item> |
| 100 | + </v-list-group> |
| 101 | + </template> |
76 | 102 | </v-list-group> |
77 | 103 | <v-list-item |
78 | 104 | color="primary" |
|
328 | 354 | title: 'Menu Levels', |
329 | 355 | icon: 'mdi-folder', |
330 | 356 | model: false, |
| 357 | + type: 'sub-menu', |
331 | 358 | children: [ |
332 | | - { title: 'Level 1.1', icon: 'mdi-circle-small', }, |
| 359 | + { title: 'Level 1.1', |
| 360 | + icon: 'mdi-circle-small', |
| 361 | + children: [ |
| 362 | + { title: 'Level 1.2', icon: 'mdi-circle-small', link: '/extra/calendar'}, |
| 363 | + { title: 'Level 1.3', icon: 'mdi-circle-small', link: '/extra/invoice'}, |
| 364 | + ]}, |
333 | 365 | { |
334 | | - title: 'Level 1.2', |
| 366 | + title: 'Level 2.1', |
335 | 367 | icon: 'mdi-folder', |
336 | 368 | model: false, |
337 | 369 | children: [ |
338 | | - { title: 'Calendar', icon: 'mdi-circle-small', link: '/extra/calendar'}, |
339 | | - { title: 'Invoice', icon: 'mdi-circle-small', link: '/extra/invoice'}, |
| 370 | + { title: 'Level 2.2', icon: 'mdi-circle-small', link: '/extra/calendar'}, |
| 371 | + { title: 'Level 2.3', icon: 'mdi-circle-small', link: '/extra/invoice'}, |
340 | 372 | ], |
341 | 373 | }, |
342 | 374 | ], |
|
0 commit comments