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

527
Views
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 answers
Answer question

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 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!