Untitled
<template v-slot:body="{ items, props }"> <tr v-for="(item, index) in items" :key="item.id"> <td v-for="header in headers" :key="header.value"> {{ item[header.value] }} </td> <!-- Botão para expandir --> <td> <v-btn icon small @click="toggleDetails(index)"> <v-icon>{{ expandedRows.includes(index) ? 'mdi-chevron-up' : 'mdi-chevron-down' }}</v-icon> </v-btn> </td> </tr> <!-- Linha de Detalhes --> <tr v-if="expandedRows.includes(index)" class="details-row"> <td :colspan="headers.length + 1"> <v-data-table :headers="detailHeaders" :items="response.trecgis" dense show-selected hide-default-footer > </v-data-table> </td> </tr> </template>
Leave a Comment