0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-25 12:45:17 +00:00

cool search loading animation

This commit is contained in:
Front 2022-03-17 17:54:06 -04:00
parent dd969c15c5
commit db1c988133

View file

@ -1,12 +1,9 @@
<template>
<div>
<center style="padding-top: 3em;" v-if="videos == null">
<v-progress-circular
size="50"
indeterminate
color="primary"
/>
<center style="padding-top: 3em;" v-if="videos.length == 0">
<v-skeleton-loader type="card-avatar, article, actions" />
<v-skeleton-loader type="card-avatar, article, actions" />
</center>
<v-list-item v-for="(video, index) in videos" :key="index">
@ -43,14 +40,13 @@
export default {
data() {
return {
videos: null
videos: []
}
},
mounted() {
const searchQuestion = this.$route.query.q
const vm = this;
this.$youtube.search(searchQuestion, (data) => {
console.log(data)
vm.videos = data;
})
}