chore: loading indicator

This commit is contained in:
Anthony Fu 2022-11-21 04:32:20 +08:00
parent a2d5cc043c
commit 38f5d7155f

View file

@ -17,13 +17,14 @@ const { items, state, endAnchor, error } = usePaginator(paginator)
:item="item"
/>
<div ref="endAnchor" />
<div v-if="state === 'loading'" p5 color-gray-5>
Loading...
<div v-if="state === 'loading'" p5 text-center flex="~ col" items-center animate-pulse>
<div op50 i-ri:loader-2-fill animate-spin text-2xl />
<span op50>Loading...</span>
</div>
<div v-else-if="state === 'done'" p5 color-gray>
End of list
<div v-else-if="state === 'done'" p5 op50 italic text-center>
End of the list
</div>
<div v-else-if="state === 'error'" p5 color-gray>
<div v-else-if="state === 'error'" p5 op50>
ERROR: {{ error }}
</div>
</div>