Skip to content

Commit

Permalink
Adiciona loading na listagem. Issue #19
Browse files Browse the repository at this point in the history
  • Loading branch information
huogerac committed Oct 11, 2021
1 parent 06e1c0a commit df8f755
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pages/news/Home.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<template>
<v-container>
<h1>Lista de notícias</h1>
<v-progress-linear
v-if="loading"
indeterminate
size="6"
color="yellow darken-2"
></v-progress-linear>
<news-list :news="news" />
</v-container>
</template>
Expand All @@ -11,11 +17,13 @@ import NewsList from '@/components/NewsList'
export default {
data: () => ({
loading: true,
news: [],
}),
created() {
ApiNews.list().then((data) => {
this.news = data
this.loading = false
})
},
components: {
Expand Down

1 comment on commit df8f755

@vercel
Copy link

@vercel vercel bot commented on df8f755 Oct 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.