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

528
Visualizações
Vue - Loading all dynamic components once before rendering

I'm Working on a complex vue form, where I'm using dynamic components to render multiple parts of the form. Using and , it first renders the default section, then the respective sections when I click on specific tabs. I have to start from "Ship From" tab but something on "Label Specification" tab depends on the Shop From section (see below img). So I can solve the problem by rendering the "Label Specification" section first. But my requirement is to start from "Ship From" section. So either I have to preload all the dynamic components or start at Label Spec then switch fast before user can see it. How can I solve the issue? here is the code for tabs and components:

<button
      v-for="(tabname, index) in tabnames"
      v-bind:key="index"
      v-bind:class="['tab-button', { active: currentTabIndex === index }]"
      v-on:click="
        currentTab = tabs[index];
        currentTabIndex = index;
      "
    >
      <h3>
        <b>{{ tabname }}<span class="text-danger">* </span></b>
      </h3>
    </button>

    <keep-alive>
      <component
        v-bind:is="currentTabComponent"
        v-bind="currentProps"
        class="tab"
        @jsonresponse="
          saveSection(Object.keys(currentResponse)[0], ...arguments)
        "
      ></component>
    </keep-alive>
Here is img of my work

enter image description here

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

0

Use v-for + v-show without keep-alive or you can create your own implementation with lazy loading.

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