[Vuejs]-How to prompt category specified form in vue js

0👍

the simplest way is just add v-if inside <fieldset v-if="step == 2"> because you already had data category in first step that will control what to display in the next step.

<fieldset v-if="step == 1">
  // html of step 1
</fieldset>
<fieldset v-if="step == 2">
  <template v-if="category == 'real estate'">
   // form for this cateegory
  </template>
  <template v-else-if="category == 'IT'">
   // form for this category
  </template>
  // and so on
  . . .

</fieldset>

Leave a comment