I am using an icon and I am making an API call when it is clicked:
<i class="fas fa-sync" @click.prevent="updateCart(item.id, item.amount)"></i>
So I want to turn it with animation till the API call is done or for two seconds.But I am not sure how to do that, so if you could give me a solution that would be great.