Skip to content
Snippets Groups Projects
Commit a3af999e authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

get also data during monted hook

parent 43c0775b
No related branches found
No related tags found
1 merge request!224Resolve "Rework references"
Pipeline #125069 canceled with stages
in 55 seconds
...@@ -27,6 +27,13 @@ onBeforeMount(async () => { ...@@ -27,6 +27,13 @@ onBeforeMount(async () => {
const { article: articleOnMounted } = await useFetchArticle(props.doi); const { article: articleOnMounted } = await useFetchArticle(props.doi);
article.value = articleOnMounted.value article.value = articleOnMounted.value
}) })
onMounted(async () => {
const { article: articleOnMounted } = await useFetchArticle(props.doi);
article.value = articleOnMounted.value
})
const articleTitle = computed(() => { const articleTitle = computed(() => {
return props?.title ?? article?.value?.title ?? props.doi; return props?.title ?? article?.value?.title ?? props.doi;
}); });
......
...@@ -14,6 +14,10 @@ onBeforeMount(async () => { ...@@ -14,6 +14,10 @@ onBeforeMount(async () => {
const { article: articleOnMounted } = await useFetchArticle(props.doi); const { article: articleOnMounted } = await useFetchArticle(props.doi);
article.value = articleOnMounted.value article.value = articleOnMounted.value
}) })
onMounted(async () => {
const { article: articleOnMounted } = await useFetchArticle(props.doi);
article.value = articleOnMounted.value
})
</script> </script>
<template> <template>
<!-- <v-chip v-if="article" variant="text" :href="`#ref-${props.doi}`" class="pa-0 font-italic">{{ <!-- <v-chip v-if="article" variant="text" :href="`#ref-${props.doi}`" class="pa-0 font-italic">{{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment