pcpuma_unam_operador/components/inputs/InputIdPrestamo.vue
2022-08-28 21:56:55 -05:00

36 lines
790 B
Vue

<template>
<b-field class="column mb-0 pb-0" label="Id préstamo" :class="columnSize">
<b-input
icon="numeric"
placeholder="Id préstamo"
type="text"
@keyup.enter.native="ejecutar()"
v-model="idPrestamo"
rounded
/>
</b-field>
</template>
<script>
export default {
props: {
ejecutar: { typeof: Function, required: true, default: () => {} },
idPrestamoPadre: { typeof: String, required: true, default: '' },
columnSize: { typeof: String, required: false, default: '' },
},
data: () => {
return { idPrestamo: '' }
},
watch: {
idPrestamo() {
this.$emit('id-prestamo', this.idPrestamo)
},
idPrestamoPadre() {
this.idPrestamo = this.idPrestamoPadre
},
},
}
</script>
<style scoped></style>