0
0
Fork 0

fix: remove FetchData

This commit is contained in:
Javier Segarra 2024-09-13 22:52:26 +02:00
parent ed5ba1dd1a
commit 401400bdcf
1 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,7 @@
<script setup>
import { ref, toRefs, computed, watch, onMounted } from 'vue';
import { ref, toRefs, computed, watch, onMounted, useAttrs } from 'vue';
import { useI18n } from 'vue-i18n';
import FetchData from 'src/components/FetchData.vue';
import { useValidator } from 'src/composables/useValidator';
const emit = defineEmits(['update:modelValue', 'update:options', 'remove']);
@ -225,6 +226,16 @@ const getVal = (val) => ($props.useLike ? { like: `%${val}%` } : val);
</script>
<template>
<FetchData
ref="dataRef"
:url="$props.url"
@on-fetch="(data) => setOptions(data)"
:where="where || { [optionValue]: value }"
:limit="limit"
:sort-by="sortBy"
:fields="fields"
:params="params"
/>
<QSelect
v-model="value"
:options="myOptions"