Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created October 27, 2021 18:05
Embed
What would you like to do?
<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