How to remove an item from an array in Vue.js

前端 未结 8 1122
小蘑菇
小蘑菇 2020-11-29 02:24

I am new to vue.js (2) and I am currently working on a simple event app. I\'ve managed to add events but now I would like to delete events based on clicking on a button.

8条回答
  •  醉酒成梦
    2020-11-29 02:58

    Why not just omit the method all together like:

    v-for="(event, index) in events"
    ...
    

提交回复
热议问题