Q:

Tab is removed but its contents are not. How to fix?

I tested this code
https://jsfiddle.net/gerald3ebd/k7abtf35/
and saw that after adding 20 tabs, for example, when deleting a tab, its contents of the deleted tab are not deleted.  I know that in practice it may not be necessary to add as many tabs, but the fact is that it is still a problem.
I tried to remove it by assigning an id like #detail-n, but it didn't work. How to solve this?

A:

You make a very simple mistake. You didn't define the index for v-for. Here is the working code.

