chore(Table): handle empty-state

Resolves #243
This commit is contained in:
Benjamin Canac
2023-05-31 18:30:49 +02:00
parent 8bdb8c45f7
commit 2966373a86
5 changed files with 78 additions and 3 deletions

View File

@@ -1,4 +1,21 @@
<script setup>
const columns = [{
key: 'id',
label: 'ID'
}, {
key: 'name',
label: 'Name'
}, {
key: 'title',
label: 'Title'
}, {
key: 'email',
label: 'Email'
}, {
key: 'role',
label: 'Role'
}]
const people = [{
id: 1,
name: 'Lindsay Walton',
@@ -58,6 +75,6 @@ const filteredRows = computed(() => {
<UInput v-model="q" placeholder="Filter people..." />
</div>
<UTable :rows="filteredRows" />
<UTable :rows="filteredRows" :columns="columns" />
</div>
</template>