[Vuejs]-Vue.js – Get data from modal and save to array

0👍

You will need to add a method on the modal (either inline or in the methods key) which does specifically what you want it to.

Just a rough idea of what I mean:

<button 
   type="button" 
   class="btn btn-success btn-block" 
   @click="() => addCart( {
          item_name: selectedUser.item_name,
          price: variants.default_price,
      })"
>Add to Cart</button>

Obviously you’ll have to work with that to make it do what you want.

Leave a comment