fix: fix Hydration completed but contains mismatches error in production (#89)

This commit is contained in:
Di Sheng
2024-05-07 23:05:01 -07:00
committed by GitHub
parent cc2cb58092
commit bd5341f34d

View File

@@ -1,17 +1,20 @@
<template>
<Layout>
<template #doc-footer-before>
<ClientOnly>
<Copyright v-if="(frontmatter?.aside ?? true) && (frontmatter?.showArticleMetadata ?? true) && !(frontmatter.authorLink)" :key="md5(page.relativePath)" />
</ClientOnly>
</template>
<template #doc-after>
<Comment v-if="(theme.commentConfig?.showComment ?? true) && (frontmatter?.showComment ?? true)" :commentConfig="theme.commentConfig" :key="md5(page.relativePath)" />
</template>
<template #layout-bottom>
<Footer v-if="!hasSidebar && (theme.footerConfig?.showFooter ?? true) && (frontmatter?.showFooter ?? true)" />
</template>
</Layout>
<ClientOnly>
<Layout>
<template #doc-footer-before>
<Copyright
v-if="(frontmatter?.aside ?? true) && (frontmatter?.showArticleMetadata ?? true) && !(frontmatter.authorLink)"
:key="md5(page.relativePath)" />
</template>
<template #doc-after>
<Comment v-if="(theme.commentConfig?.showComment ?? true) && (frontmatter?.showComment ?? true)"
:commentConfig="theme.commentConfig" :key="md5(page.relativePath)" />
</template>
<template #layout-bottom>
<Footer v-if="!hasSidebar && (theme.footerConfig?.showFooter ?? true) && (frontmatter?.showFooter ?? true)" />
</template>
</Layout>
</ClientOnly>
</template>
<script lang="ts" setup>