Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

180
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda