Skip to content

Instantly share code, notes, and snippets.

@neoandrevictor
Created November 3, 2020 17:27
Show Gist options
  • Save neoandrevictor/70e4ea763ccdde5f1fcf306d57c3d1e7 to your computer and use it in GitHub Desktop.
Save neoandrevictor/70e4ea763ccdde5f1fcf306d57c3d1e7 to your computer and use it in GitHub Desktop.
vue3
@neoandrevictor
Copy link
Author

<button class="botao botao-perigo" :type="tipo">{{rotulo}}</button>

@neoandrevictor
Copy link
Author

.botao {
display: inline-block;
padding: 10px;
border-radius: 3px;
margin: 10px;
font-size: 1.2em;
}

.botao-perigo {
    background: firebrick;
    color: white;
}

.botao-padrao {
    background: darkcyan;
    color: white;
}

@neoandrevictor
Copy link
Author

methods: {

remove() {
  alert('Precisa saber qual foto remover!');
}

}

@neoandrevictor
Copy link
Author

@click.native="remove()"

@neoandrevictor
Copy link
Author

remove(foto) {
     if(confirm('Confirma?')) {
         alert(foto.titulo);
     }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment