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.
- [Vuejs]-How to pass a variable from js file to a .vue file
- [Vuejs]-Axios Flask. Parsing fileblob and json
Source:stackexchange.com