I am faced with a scenario where I have 2 buttons:
<Button
:disabled="disabled"
:loading="isLoading1"
@click="handleClick1"
>Btn 1</Button>
<Button
:disabled="disabled"
:loading="isLoading2"
@click="handleClick2"
>Btn 2</Button>
computed: {
isLoading1(){
...
}
isLoading2(){
...
}
methods:{
handleClick1(){
...
}
handleClick2(){
...
}
}
The challenge lies in ensuring that the loading state is only triggered for the button that was clicked, not both. How can this be accomplished? Is there a way to track which button was clicked or any other method to achieve this desired behavior?