46 lines
880 B
Vue
46 lines
880 B
Vue
<template>
|
|
<div class="column">
|
|
<b-field label="Número de Prestamo">
|
|
<b-input
|
|
type="number"
|
|
@keyup.enter.native="llamarPrestamoIdPrestamo()"
|
|
v-model="idPrestamo"
|
|
/>
|
|
</b-field>
|
|
|
|
<b-field class="has-text-centered">
|
|
<b-button
|
|
type="is-info"
|
|
@click="prestamoIdPrestamo(idPrestamo, idPrestamoReset)"
|
|
:disabled="!idPrestamo"
|
|
>
|
|
Enviar
|
|
</b-button>
|
|
</b-field>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
prestamoIdPrestamo: { type: Function, required: true },
|
|
},
|
|
data() {
|
|
return {
|
|
idPrestamo: '',
|
|
}
|
|
},
|
|
methods: {
|
|
idPrestamoReset() {
|
|
this.idPrestamo = ''
|
|
},
|
|
llamarPrestamoIdPrestamo() {
|
|
if (this.idPrestamo)
|
|
this.prestamoIdPrestamo(this.idPrestamo, this.idPrestamoReset)
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style></style>
|