1<v-data-table
2 :headers="headers"
3 :items="desserts"
4 :expanded="expanded"
5 item-key="name"
6 show-expand
7 class="elevation-1"
8 @click:row="clicked">
9
1 clicked (value) {
2 const index = this.expanded.indexOf(value)
3 if (index === -1) {
4 this.expanded.push(value)
5 } else {
6 this.expanded.splice(index, 1)
7 }
8 },
9