Best way to use Skeleton
-
Hi all,
I would like to integrate Skeleton into my app.
https://quasar.dev/vue-components/skeletonI load my data from a method (axios consumes an api) called in the mounted.
I can load a “skeleton” data and update my DOM from this value, but i dont know if it’s the best wayaxios({ method: 'GET', url: process.env.API_URL + '/method/' + this.user.id + '/' + this.day, headers: { 'Content-Type': 'application/json' } }) .then(response => { this.poste = response.data this.skeleton = false }) .catch((e) => { this.$q.notify({ message: e, type: 'negative' }) })
<q-item-section avatar> <q-skeleton type="QAvatar" animation="fade" v-if="skeleton" /> <q-avatar v-else><img :src="poste.avatar"><q-avatar/> </q-item-section> ```
-
@Shoooryuken looks fine to me.