fix: Use withBase method for app images on documentation

This commit is contained in:
Faruk AYDIN
2022-11-02 18:48:34 +01:00
parent aeeb058ebb
commit d43f77a894
13 changed files with 28 additions and 29 deletions

View File

@@ -1,12 +1,24 @@
<script setup>
import { useData } from 'vitepress';
import { computed } from 'vue';
import { useData, withBase } from 'vitepress';
import { VPTeamMembers } from 'vitepress/theme';
const props = defineProps(['favicon']);
const { frontmatter: fm } = useData();
const computedItems = computed(() => {
const itemsLength = fm.value.items?.length;
if (!itemsLength) return [];
return fm.value.items.map((item) => {
return {
...item,
avatar: withBase(fm.value.favicon),
};
});
});
</script>
<template>
<VPTeamMembers size="small" :members="fm.items" />
<VPTeamMembers size="small" :members="computedItems" />
</template>