Update SourceView.vue
This commit is contained in:
@@ -76,9 +76,15 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-center">
|
<div class="flex justify-center">
|
||||||
|
|
||||||
<div v-show="loading">
|
<div v-show="loading">
|
||||||
<lottie-player src="https://assets9.lottiefiles.com/private_files/lf30_bIUWq7.json" background="transparent" speed="3" style="width: 100px; height: 100px;" loop autoplay></lottie-player>
|
<lottie-player
|
||||||
|
src="https://assets9.lottiefiles.com/private_files/lf30_bIUWq7.json"
|
||||||
|
background="transparent"
|
||||||
|
speed="3"
|
||||||
|
style="width: 100px; height: 100px;"
|
||||||
|
loop
|
||||||
|
autoplay
|
||||||
|
></lottie-player>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
@@ -140,10 +146,11 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
fetchNewArticles() {
|
fetchNewArticles() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
sleep(2000).then(() => {
|
||||||
axios
|
axios
|
||||||
.get(
|
.get(
|
||||||
`/api/source/${this.source.slug}?page=${this.current_page +
|
`/api/source/${this.source.slug}?page=${this
|
||||||
1}`
|
.current_page + 1}`
|
||||||
)
|
)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.current_page = response.data.articles.current_page;
|
this.current_page = response.data.articles.current_page;
|
||||||
@@ -151,6 +158,7 @@ export default {
|
|||||||
this.articles.push(...response.data.articles.data);
|
this.articles.push(...response.data.articles.data);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user