0
I have a session in my application, where the user disables and activates documents, at the time it activates or disables wanted to show a successful Alert in the Vue.js standard, but I don’t know how.
The bottom one has the active code and disables the document, as I would give an Alert on the screen for the user that the operation ON or DISABLE worked?
methods: {
handleDesactive() {
if ( this.typeShow != 6 ) {
axios.get(`/atas/${this.id}/desativar`)
.then( res => eventHub.$emit('removeCard', this.id) );
alert('You clicked the button!');
} else {
axios.get(`/atas/${this.id}/ativar`)
.then( res => eventHub.$emit('removeCard', this.id) );
}
}
}
Utilize
.then( () => alert("Deu certo") )
how much to use theaxios
– Valdeir Psr
Beauty
then( res => eventHub.$emit('removeCard', this.id) => alert("Deu certo")
thus?– Romulo Sousa
https://hastebin.com/kecefiwoka.js
– Valdeir Psr
There’s nothing in that hastebin
– Romulo Sousa
https://pastebin.com/qDVJD8XS
– Valdeir Psr