No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Best way to use Skeleton

    Help
    2
    2
    962
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Shoooryuken
      Shoooryuken last edited by

      Hi all,
      I would like to integrate Skeleton into my app.
      https://quasar.dev/vue-components/skeleton

      I 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 way 🙂

      axios({
              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>
      ```
      metalsadman 1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman @Shoooryuken last edited by

        @Shoooryuken looks fine to me.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post