Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created October 27, 2021 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/72567245c93767cde85f25cda158bd9e to your computer and use it in GitHub Desktop.
Save parzibyte/72567245c93767cde85f25cda158bd9e to your computer and use it in GitHub Desktop.
<template>
<div class="modal-card" style="width: auto">
<header class="modal-card-head">
<p class="modal-card-title">Cobrar</p>
</header>
<section class="modal-card-body">
{{ dispositivo }}
</section>
<footer class="modal-card-foot">
<b-button @click="cobrar()" type="is-success">Ok</b-button>
<b-button @click="cerrar()">Cancelar</b-button>
</footer>
</div>
</template>
<script>
export default {
props: ["dispositivo"],
methods: {
cerrar() {
this.$parent.close();
},
cobrar() {
const costo = 1;
if (costo <= 0) {
return;
}
this.$emit("cobrado", costo);
},
},
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment