refs #6787 isLoading
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-02-05 09:57:09 +01:00
parent 6c1bad1cf5
commit 5462d3ce9a
1 changed files with 8 additions and 2 deletions

View File

@ -19,16 +19,17 @@ const $props = defineProps({
default: null, default: null,
}, },
}); });
const isLoading = ref(false);
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
const entityId = computed(() => { const entityId = computed(() => {
return $props.id || route.params.id; return $props.id || route.params.id;
}); });
isLoading.value = true;
const data = ref(useCardDescription()); const data = ref(useCardDescription());
const setData = (entity) => (data.value = useCardDescription(entity.name, entity.id)); const setData = (entity) => (data.value = useCardDescription(entity.name, entity.id));
isLoading.value = false;
</script> </script>
<template> <template>
@ -121,6 +122,11 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
</QCardActions> </QCardActions>
</template> </template>
</CardDescriptor> </CardDescriptor>
<QInnerLoading
:label="t('globals.pleaseWait')"
:showing="isLoading"
color="primary"
/>
</template> </template>
<i18n> <i18n>
{ {