Edited How can I dynamically assign classes to multiple elements within a v-for loop? Since I cannot utilize a computed property due to the presence of v-for, I attempted using a method by passing the index of the element, but that approach did not yield the desired result.
<div v-for="(pet,index) in pets"
:key="pet.id"
:index="index">
<v-row
class="d-flex justify-center"
>
... (code continues)
When a user selects a button, both the card containing the button and the button itself should have their styles modified to indicate selection. All other cards and buttons should revert to their default styles, emphasizing the selected card among the group.