Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
How to get text below vue.js spinner inside div v-if

I'm using Vue for the front-end part of the app where I've got <div v-if=""> block like below:

<div class="panel">
  <div class="panel-body">
    <div v-if="this.databaseSyncInProgress" class="col-12 d-flex justify-content-center mt-10">
      <moon-loader :loading="true" :color="'#3e8ef7'"></moon-loader>
      Database sync in progress...
    </div>
    <div v-if="!this.databaseSyncInProgress" class="row">
      <div>
        <h4>Synchronize database</h4>

        <button
        type="button"
        class="btn btn-primary"
        style="float: center"
        @click="syncAll"
        >
        Sync database
      </button>
      </div>
    </div>
  </div>
</div>

<script>

import MoonLoader from 'vue-spinner/src/MoonLoader.vue'

export default {
  name: 'BackboneFetchAll',
  data() {
    return { }
  },
  components: {
    MoonLoader
  },
}
</script>

So basically when this.databaseSyncInProgress will be true the spinner should show up with a text Database sync in progress.... Everything works well but the text Database sync in progress... is not below the spinner but above it on the right side like below :

enter image description here

How do I change the text to be below the spinner?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try it this way:

<div class="panel">
  <div class="panel-body">
    <div v-if="this.databaseSyncInProgress" class="col-12 d-flex flex-column justify-content-center mt-10">
      <moon-loader :loading="true" :color="'#3e8ef7'"></moon-loader>
      <p>Database sync in progress...</p>
    </div>
    <div v-if="!this.databaseSyncInProgress" class="row">
      <div>
        <h4>Synchronize database</h4>

        <button
        type="button"
        class="btn btn-primary"
        style="float: center"
        @click="syncAll"
        >
        Sync database
      </button>
      </div>
    </div>
  </div>
</div>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!