Skip to content

Instantly share code, notes, and snippets.

View Erefor's full-sized avatar
🏠
Working from home

José Salvador Erefor

🏠
Working from home
View GitHub Profile
@Erefor
Erefor / DynamicInput.vue
Last active November 30, 2023 16:55
DynamicInput
<template>
<div :class="inputConfig?.cssClass ?? ''">
<QInput
v-if="inputConfig?.inputType === 'text' || inputConfig?.inputType === 'number' || inputConfig?.inputType === 'textarea'"
:label="inputConfig?.label ?? 'NA'"
:type="inputConfig?.inputType ?? 'text'"
:rules="inputConfig?.rules ?? []"
:model-value="modelValue"
:mask="inputConfig.mask"
@update:model-value="value = $event"
@Erefor
Erefor / Table.vue
Last active August 15, 2022 17:18
Table in Vue 3
<template>
<div class="ui-table-container">
<table class="ui-table-body">
<thead class="ui-table-heade">
<tr>
<th
v-for="(column, index) in componentColumns"
:key="index"
:title="column?.label"
class="ui-table-th"
@Erefor
Erefor / component.vue
Created August 14, 2022 02:20
Vue 3 / Options Api Detect outside click
<template>
<div
ref="componentRef"
class="general-style"
>
</div>
</template>
<script>
import useDetectOutsideClick from '/useDetectOutsideClick'