-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): add docs for table loading state
- Loading branch information
1 parent
a15c40a
commit 1c851b4
Showing
2 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
docs/components/content/examples/TableExampleLoadingSlot.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script setup> | ||
const columns = [{ | ||
key: 'name', | ||
label: 'Name' | ||
}, { | ||
key: 'title', | ||
label: 'Title' | ||
}, { | ||
key: 'email', | ||
label: 'Email' | ||
}, { | ||
key: 'role', | ||
label: 'Role' | ||
}, { | ||
key: 'actions' | ||
}] | ||
const people = [] | ||
const isLoading = ref(true); | ||
</script> | ||
|
||
<template> | ||
<UTable :rows="people" :columns="columns" :is-loading="isLoading"> | ||
<template #loading-state> | ||
<div class="flex items-center justify-center"> | ||
<span class="py-10">Loading...</span> | ||
</div> | ||
</template> | ||
</UTable> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters