refs #6787 isLoading CardDescriptor
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
5462d3ce9a
commit
760b2d5574
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { onMounted, useSlots, watch, computed } from 'vue';
|
||||
import { onMounted, useSlots, watch, computed, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useQuasar } from 'quasar';
|
||||
import SkeletonDescriptor from 'components/ui/SkeletonDescriptor.vue';
|
||||
|
@ -39,6 +39,7 @@ const quasar = useQuasar();
|
|||
const slots = useSlots();
|
||||
const { t } = useI18n();
|
||||
const entity = computed(() => useArrayData($props.dataKey).store.data);
|
||||
const isLoading = ref(false);
|
||||
|
||||
defineExpose({
|
||||
getData,
|
||||
|
@ -60,8 +61,13 @@ async function getData() {
|
|||
filter: $props.filter,
|
||||
skip: 0,
|
||||
});
|
||||
isLoading.value = true;
|
||||
try {
|
||||
const { data } = await arrayData.fetch({ append: false, updateRouter: false });
|
||||
emit('onFetch', data);
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
}
|
||||
const emit = defineEmits(['onFetch']);
|
||||
|
||||
|
|
Loading…
Reference in New Issue