pcpuma_unam_operador/components/inputs/InputModulo.vue
2022-08-29 08:09:35 -05:00

47 lines
1.0 KiB
Vue

<template>
<b-field
:class="column ? `column ${columnSize} mb-0 pb-0` : ''"
:label="label || 'Módulo'"
>
<b-input
icon="store"
placeholder="Nombre del módulo"
type="text"
:disabled="disabled"
@keyup.enter.native="ejecutar()"
v-model="modulo"
rounded
/>
</b-field>
</template>
<script>
export default {
props: {
column: { type: Boolean, required: false, default: false },
disabled: { type: Boolean, required: false, default: false },
ejecutar: {
typeof: Function,
required: false,
default: () => function () {},
},
columnSize: { typeof: String, required: false, default: '' },
moduloPadre: { typeof: String, required: true, default: '' },
label: { typeof: String, required: false, default: '' },
},
data: () => {
return { modulo: '' }
},
watch: {
modulo() {
this.$emit('modulo', this.modulo)
},
moduloPadre() {
this.modulo = this.moduloPadre
},
},
}
</script>
<style scoped></style>