pass index to child event listener in parent component in vuejs

前端 未结 2 2089
粉色の甜心
粉色の甜心 2021-01-20 02:47

I have a list of objects within a v-for loop:

2条回答
  •  执笔经年
    2021-01-20 02:56

    You can bind an arrow function expression in your event handler. For example

    
    

    JSFiddle demo (from the Vue boilerplate) ~ https://jsfiddle.net/zmxksv35/

提交回复
热议问题