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
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.
- [Vuejs]-How to unmount a Vue3 component in script setup
- [Vuejs]-Vue Router – Same path, but different components
Source:stackexchange.com