pcpuma_unam_operador/components/inputs/InputCarrito.vue

38 lines
796 B
Vue
Raw Normal View History

2022-08-29 02:56:55 +00:00
<template>
<b-field class="column mb-0 pb-0" label="Carrito" :class="columnSize">
<b-input
icon="cart"
maxlength="3"
placeholder="Carrito"
type="text"
:has-counter="false"
@keyup.enter.native="ejecutar()"
v-model="carrito"
rounded
/>
</b-field>
</template>
<script>
export default {
props: {
ejecutar: { typeof: Function, required: true, default: () => {} },
carritoPadre: { typeof: String, required: true, default: '' },
columnSize: { typeof: String, required: false, default: '' },
},
data: () => {
return { carrito: '' }
},
watch: {
carrito() {
this.$emit('carrito', this.carrito)
},
carritoPadre() {
this.carrito = this.carritoPadre
},
},
}
</script>
<style scoped></style>