[Vuejs]-How can i add / change multiple select option dynamically usign vuejs from same form

0๐Ÿ‘

  1. Create a separate component for Drop down list like shown in following image.
    enter image description here

  2. This component will receive the drop down options as props.

  3. Now import it inside the main component lets say App.vue

  4. initialize a variable lets say count to either 0 or 1 by default.

  5. Bind that variable to Add + button so that on every click of that button the count variable will increment by one.

  6. use that count variable as for loop and inside that loop call that Drop down component as shown in following image.
    enter image description here

  7. As you click the button, it will increment the count and also add another dropdown as shown in following image.
    enter image description here

Leave a comment