Skip to content
Snippets Groups Projects

Multiple dois

Merged Remi PLANEL requested to merge multiple-dois into dev
Files
6
+ 12
9
@@ -3,15 +3,18 @@ export interface Props {
@@ -3,15 +3,18 @@ export interface Props {
doi: string;
doi: string;
}
}
const props = withDefaults(defineProps<Props>(), {});
const props = withDefaults(defineProps<Props>(), {});
const { article } = useFetchArticle(props.doi);
const dois = computed(() => {
 
return props.doi.split(',').map((d) => d.trim()).filter(d => d !== "")
 
})
 
 
 
</script>
</script>
<template>
<template>
<v-chip
(
v-if="article"
<template v-for="doi, index in dois" :key="doi">
variant="text"
<RefArticle :doi="doi"></RefArticle>
:href="`#ref-${props.doi}`"
<span v-if="index < dois.length - 1">, </span>
class="pa-0 text-caption font-italic"
</template>
>({{ article?.author[0]?.family ?? "test" }} et al,
)
{{ article?.year }})</v-chip
>
</template>
</template>
 
\ No newline at end of file
Loading