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

370
Visualizações
How can ı do vue 3 compositon api router refresh page

After confirming in vue 3 compositon api

router.push('/IssueList');

Here, I want my and components to refresh when they come to the IssueList page.

I'm redirecting to the page, but it doesn't refresh the issuelist page. How can I do that?

The codes on my IssueList page are as follows.

<template>
  <div>
    <div class="card">
      
      <h5>Konu Listesi</h5>
      <Button label="Yeni Konu Oluştur" class="p-button-success p-button-outlined mb-2" icon="pi pi-plus"
              @click="newIssue"></Button>
      <TabView ref="tabview1">
        <TabPanel header="Bana Gelenler">
          <issue-incoming></issue-incoming>
        </TabPanel>
        <TabPanel header="Benim Yazdıklarım">
          <issue-send  ></issue-send>
        </TabPanel>
      </TabView>
    </div>
  </div>

</template>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

if i understand your question correctly you should tie a :key value pair to the component you want to refresh. so essentially when whatever happens in the example function it will increment the change variable which is tied to the component and forces it to refresh.

example -

    <template>
  <div>
   <div @click="example()"> <p>update</p> </div>
    <Component :key="change" />
  </div>
</template>

<script>
import { ref } from "vue";
export default {
  components: {
    Component,
  },
  setup() {
    var change = ref(0);

    function example() {
      
        change.value += 1;
      
    }

    return {
      change,
      example,
    };
  },
};
</script>
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