[Vuejs]-Vue todo app deletes first element instead of specific

0👍

There are many errors in you code . First you are trying to bind key with id which is not present your data. Instead of id use index
enter image description here

Then send this index in delete method .
If you are going to use id by adding id in data then when you send id to delete method you need find index object with same id before using splice , you can use indexof to find index of object in array.

Leave a comment