pcpuma_unam_operador/components/inputs/InputModulo.vue

44 lines
1017 B
Vue
Raw Normal View History

2022-08-29 02:56:55 +00:00
<template>
<b-field
class=""
: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: true, default: () => {} },
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>