Answer the question
In order to leave comments, you need to log in
How to make a button inactive for a few seconds after it is clicked?
There is a text of the area, it has an icon, by clicking on which a submit takes place. You need to somehow make the button inactive for a few seconds after pressing. I can’t find how to make this icon inactive, but you can use the attribute disabled
to make the entire field inactive, including the icon. I can bind this attribute, but then how can I make sure that there is a labor there for a while, and then a fall and the field becomes available?
<v-textarea
v-model="message"
@click:append="sendMessage"
:label="Введите сообщение"
append-icon="mdi-send"
:disabled="///////////////////////"
></v-textarea>
Answer the question
In order to leave comments, you need to log in
add a field to the component
somewhere in the submit handling
disabledSubmit: false
:disabled="disabledSubmit">
this.submitDisabled = true; // Перед запросом
Vue.axios.get('/info')
.then(info => {
this.submitDisabled = false; // Запрос выполнен
// ...
});
this.textAreaDisabled = true;
setTimeout(() => {
this.textAreaDisabled = false;
}, 5000)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question