i want to get the value of the button when click i already add a method. but whenever i click theres nothing. the value not passing. can anyone help me? Thank you.
Here is the code:
<button
class="button buttonvalue"
v-for="(p,index) in buttonvalue"
:key="index"
@click="webcamSendRequestButton($event)"
>{{p}}</button>
Method:
methods: {
webcamSendRequestButton: function(e) {
// const buttonValue = e.target.value;
// console.log(e.target.value)
alert(e.target.value);
}
}
DATA (Json) of button value
array data: small,medium,large
this.buttonvalue= this.item[0].buttonvalue.split(',');