javascript - vue only recognizes the first input in the list
仅有的幸福
仅有的幸福 2017-06-26 10:56:40
0
2
724

The questioner made a list and the effect is as shown

But clicking on the checkboxes on lines 2 and 3 all responds to the checkbox on the first line, so the questioner added a click method to him. After looking at it, he found that if I didn’t click on the second or third line, the itemIndex was both 0( itemIndex is the index of the data source v-for), it is good to add the click event to the highest level. Why is this happening?

仅有的幸福
仅有的幸福

reply all (2)
phpcn_u1582

Checkbox should be set to different values to obtain, otherwise the last two will be overwritten by the first one.

    Peter_Zhu

    See documentation

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!