diff --git a/apps/zhi-blog-nuxt/app.config.ts b/apps/zhi-blog-nuxt/app.config.ts index 03d42d40..523e7d38 100644 --- a/apps/zhi-blog-nuxt/app.config.ts +++ b/apps/zhi-blog-nuxt/app.config.ts @@ -96,7 +96,7 @@ export default defineAppConfig({ }, ], sidebarDepth: 2, // 侧边栏显示深度,默认1,最大2(显示到h3标题) - logo: "/img/logo-small.png", // 导航栏logo + logo: "img/logo-small.png", // 导航栏logo repo: "terwer/zhi", // 导航栏右侧生成Github链接 // repo: "https://gitee.com/terwer/zhi", repoLabel: undefined, diff --git a/apps/zhi-blog-nuxt/components/vdoing/BodyBgImg.vue b/apps/zhi-blog-nuxt/components/vdoing/BodyBgImg.vue index 637bbf1e..73cebc77 100644 --- a/apps/zhi-blog-nuxt/components/vdoing/BodyBgImg.vue +++ b/apps/zhi-blog-nuxt/components/vdoing/BodyBgImg.vue @@ -18,7 +18,7 @@ ZhiBlogNuxtUtil.initEnv(env) // datas const datas = reactive({ - appBase: window.location.origin + env.getStringEnv("VITE_APP_BASE"), + appBase: env.getStringEnv("VITE_APP_BASE"), bgImg: "", opacity: 0.5, }) @@ -39,6 +39,9 @@ const methods = { } // lifecycle +onBeforeMount(() => { + datas.appBase = window.location.origin + env.getStringEnv("VITE_APP_BASE") +}) onMounted(() => { const { bodyBgImg, bodyBgImgOpacity, bodyBgImgInterval = 15 } = appConfig.themeConfig diff --git a/apps/zhi-blog-nuxt/components/vdoing/MeiliSearchBox.vue b/apps/zhi-blog-nuxt/components/vdoing/MeiliSearchBox.vue index 4f6d3307..0ac6f378 100644 --- a/apps/zhi-blog-nuxt/components/vdoing/MeiliSearchBox.vue +++ b/apps/zhi-blog-nuxt/components/vdoing/MeiliSearchBox.vue @@ -30,6 +30,10 @@ import { AisInstantSearch, AisHits, AisSearchBox } from "vue-instantsearch/vue3/es" const client = useMeilisearchClient() + +// lifecycle +onBeforeMount(() => { +})