From 439632ce982c09c24a22fc0b6046efd2a73947e1 Mon Sep 17 00:00:00 2001 From: sugar Date: Thu, 11 Jul 2024 22:32:42 +0800 Subject: [PATCH] fix: init project withBase error --- packages/theme/src/components/BlogAuthor.vue | 5 +++-- packages/theme/src/components/BlogHomeHeaderAvatar.vue | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/theme/src/components/BlogAuthor.vue b/packages/theme/src/components/BlogAuthor.vue index 373082206..83885f5e8 100644 --- a/packages/theme/src/components/BlogAuthor.vue +++ b/packages/theme/src/components/BlogAuthor.vue @@ -12,10 +12,11 @@ const author = computed(() => ?? site.value.themeConfig?.blog?.author ) const logo = computed(() => - frontmatter.value.logo + frontmatter.value?.logo ?? frontmatter.value?.blog?.logo ?? home?.logo - ?? site.value.themeConfig.logo + ?? site.value?.themeConfig?.logo + ?? '/logo.png' ) const show = computed(() => author.value || logo.value) diff --git a/packages/theme/src/components/BlogHomeHeaderAvatar.vue b/packages/theme/src/components/BlogHomeHeaderAvatar.vue index e072e4b47..5452e4486 100644 --- a/packages/theme/src/components/BlogHomeHeaderAvatar.vue +++ b/packages/theme/src/components/BlogHomeHeaderAvatar.vue @@ -9,7 +9,8 @@ const logo = computed(() => frontmatter.value.logo ?? frontmatter.value?.blog?.logo ?? home?.logo - ?? site.value.themeConfig.logo + ?? site.value.themeConfig?.logo + ?? '/logo.png' ) const alwaysHide = computed(() => frontmatter.value.blog?.minScreenAvatar === false)