JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.3.18/dist/vuetify.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vuetify@2.3.18/dist/vuetify.min.css">
<div id="app">
<v-app id="inspire">
<v-data-table
:headers="continentHeaders"
:items="items"
item-key="name"
show-expand
>
<template #expanded-item="{ headers, item }">
<td :colspan="headers.length">
<v-data-table
:headers="countryHeaders"
:items="item.countries"
></v-data-table>
</td>
</template>
</v-data-table>
</v-app>
</div>
JavaScript
new Vue({
el: '#app',
vuetify: new Vuetify(),
data: () => ({
continentHeaders: [
{ text: 'Континент', value: 'name' },
{ text: 'Площадь, млн. км²', value: 'area' },
],
countryHeaders: [
{ text: 'Страна', value: 'name' },
{ text: 'Столица', value: 'capital' },
{ text: 'Население, млн. чел.', value: 'population' },
],
items: [
{ name: 'Северная Америка', area: 24.71, countries: [
{ name: 'США', capital: 'Вашингтон', population: 331.2 },
{ name: 'Мексика', capital: 'Мехико', population: 128.6 },
{ name: 'Канада', capital: 'Оттава', population: 37.6 },
] },
{ name: 'Южная Америка', area: 17.84, countries: [
{ name: 'Бразилия', capital: 'Бразилиа', population: 207.4 },
{ name: 'Чили', capital: 'Сантьяго', population: 18.2 },
{ name: 'Аргентина', capital: 'Буэнос-Айрес', population: 45.2 },
] },
{ name: 'Африка', area: 30.22, countries: [
{ name: 'Судан', capital: 'Хартум', population: 39.5 },
{ name: 'Алжир', capital: 'Алжир', population: 44.0 },
{ name: 'Ангола', capital: 'Луанда', population: 32.5 },
] },
],
}),
});