Skip to content

Commit

Permalink
fix: Add loading indicator to List.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin3go committed Feb 21, 2024
1 parent 20e6f74 commit 821584c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/home/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
:headers="headers"
:items="dataList"
item-value="prompt"
:loading="pending"
loading-text="Loading... Please wait"
>
<template v-slot:item.prompt="{ item }">
<div>
Expand Down Expand Up @@ -100,7 +102,7 @@ const headers = ref([
{ title: "Preview", sortable: false, key: "video" },
]);
const { data: soraData }: { data: any } = await useFetch("/api/sora", {
const { data: soraData, pending }: { data: any, pending: any } = await useFetch("/api/sora", {
query: { search },
});
const { data: topWords } = await useFetch("/api/topWords");
Expand Down

0 comments on commit 821584c

Please sign in to comment.