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

194
Visualizações
Vuetify Dialog Reset Content on re-open

I have a vuetify dialog that contains an iframe.

I need that every time the dialog re-opens the iframe will reset to the beginning.

Right now the with every opening of the dialog the iframe is at its last state.

I tried using v-if on the dialog and adding a :key for re-rendering and it didn't work.

my dialog + iframe

 <v-dialog
          v-model="dialog['dialog_' + index]"
          width="500">
          <template v-slot:activator="{ on, attrs }">
            <div style="display: flex; flex-direction: column; align-items: center;">
              <v-btn
                v-on="on"
                v-bind="attrs"
                @click="onActionClick(action)"
                icon
                class="action-button">
                <img :src="'../../../static/assets/Images/' + action.icon +'.svg'">
              </v-btn>
              <p
                class="mt-2"
                style="line-height: 12px">{{ action.label }}</p>
            </div>
          </template>
          <iframe
            :src="iframeUrl"
            :title="action.label"/>
        </v-dialog>

Thank you.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

In your v-dialog component do this:

<v-dialog
  @input="refreshIframe"
  v-model="dialog['dialog_' + index]"
  width="500">

And add a method to your script like this:

methods: {
  // other methods...
  refreshIframe () {
    const tempUrl = this.iframeUrl;
    iframeUrl = "";
    iframeUrl = tempUrl;
  }
}
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